Let A be a square (n n) matrix. We want to compute the matrix B = A ?? At and st
ID: 3639696 • Letter: L
Question
Let A be a square (n n) matrix. We want to compute the matrix B = A ?? At and store this matrix inA itself. Here At denotes the transpose of the matrix A. Write a function that accepts A and computes B
without using an additional array. You are not allowed to use any extra variables other than two indices i
and j. Assume that ROWDIM and COLDIM are the storage dimensions and n n is the actual dimension of A.
Note that if A = (aij) and B = (bij), then bij = aij ?? aji and bji = aji ?? aij for all indices i; j.
Explanation / Answer
void matFunc ( int A[ROWDIM][COLDIM] , int n ) { int i,j; for (i=0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.