In this exercise, we time some methods for multiplying a lower triangular matrix by its transpose.
Run these Matlab commands:
L = tril(rand(250));
tic
A = L*L';
t1 = toc
Now write either a row-oriented algorithm to compute B = L L' or a column-oriented algorithm.
Run your algorithm and compare the time with t1.
If you want to verify the correctness of your algorithm, see if
norm(A-B)
is small.
Algorithm MatMatDot (p180) and MatMatSax (p181) can be used to help you design your algorithm. Just modify them so that they don't touch any zeros in the matrix L.
Send a plain-text email with a copy of your program and its output by midnight on Monday.