Completed assignment 2

Added implementations of the two required functions plus a third example
demonstrating wrapping the matrix.