
Gauss Elimination and LU Decompositions of Matrices 77
3.8 Computer Exercises
Computer Exercise 3.1 Transform the mylu1 to become mylusym in a way
that the operation:
A(k+1:n,k+1:n)=A(k+1:n,k+1:n)-A(k+1:n,k)*A(k,k+1:n);
is done only on the lower part of the matrix A. Check out the operation count
in the form of O(mn
3
). What is m?
Computer Exercise 3.2 Modify the above function [L,D]=mylusym(A)
to obtain a “simple” MATLAB implementation of Cholesky decomposition:
function B=mychol(A).
Computer Exercise 3.3 Complete the direct Cholesky’s decomposition
function B=mycholdir(A) of Algorithm 3.4 which computes B directly from
A using external products. Find