Open in the MATLAB editor: f07jd_example
function f07jd_example fprintf('f07jd example results\n\n'); % Symmetric tridiagonal A stored as two diagonals d = [ 4 10 29 25 5]; e = [-2 -6 15 8 ]; [df, ef, info] = f07jd( ... d, e); disp('Details of factorization'); disp('The diagonal elements of D'); disp(df); disp('Sub-diagonal elements of the Cholesky factor L'); disp(ef);
f07jd example results Details of factorization The diagonal elements of D 4 9 25 16 1 Sub-diagonal elements of the Cholesky factor L -0.5000 -0.6667 0.6000 0.5000