Assignment

Matrix Transposition

Overview

Topic: Matrix Transposition
Due:

Please make sure you adhere to the policies on academic integrity.


Introduction

Continuing with the project from the preceding assignment, our goal this week it to add functionality for computing the transpose of a matrix. In MATLAB, this can be done using a special syntax

M = A';

We cannot replicate such a syntax in C++, so we will choose to introduce a member function named transpose into our matrix class definition, to allow such a behavior to be invoked as

M = A.transpose();
This should have semantics similar to MATLAB, in that it produces and returns a new matrix that represents the transpose, while leaving the original matrix unchanged.

Your task

Starting with the files from the preceding assignment, you are to add support for matrix transpositions in the following way: You should be able to rebuild your project with the existing makefile.

Submitting your project

Attach updated versions of matrix.h and test.cpp to an email.


Last modified: Wednesday, 29 September 2010