We have been told in our homework to implement the following program:
function A = Cholesky(A) % Cholesky Decomposition of a Matrix A, so that the resulting matrix L gives A=L*L
N = size(A,1);
if abs(A(n,n)) error('* ERROR * Cholesky Decomp doesn't exist'); end; A(n:N,n) = A(n:N,n) - A(n:N,1:n-1) * A(n,1:n-1)';
A(n:N,n) = A(n:N,n) / sqrt(A(n,n));
Could anyone please explain what the line
means. I can sort of see that it is saying that the absolute values of the diagonal values can't be zero however what impact would this have on my decomposition. Thanks!!