Name: ________________________________ Section: _________________
Honor Code Acknowledgment: ___________________
Due: November 29
int KthColumnSum(const Matrix<int> & mat, int k, int numRows)
// precondition: 0 <= k < mat.Cols()
// numRows = # of rows in the matrix mat
// postcondition: returns sum of all values in column k of mat
{
}
1 2 3 4 1 5 9
5 6 7 8 2 6 10
9 10 11 12 3 7 11
4 8 12
Write the function Transpose whose header is shown
below. You'll need to use Matrix member functions Rows(), Cols(),
SetRows(), and SetCols(). The first two return the number of rows and
columns in a matrix, the second two are used to set the number of rows
and columns respectively.
void Transpose(const Matrix<double> & a, Matrix<double> & b) // postcondition: b is the transpose of a