Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.
Open in the MATLAB editor: f07cr_example
function f07cr_example fprintf('f07cr example results\n\n'); % Tridiagonal matrix stored by diagonals du = [ 2 - 1i 2 + 1i -1 + 1i 1 - 1i ]; d = [-1.3 + 1.3i -1.3 + 1.3i -1.3 + 3.3i -0.3 + 4.3i -3.3 + 1.3i]; dl = [ 1 - 2i 1 + 1i 2 - 3i 1 + 1i ]; % Factorize. [dlf, df, duf, du2, ipiv, info] = ... f07cr(dl, d, du); disp('Details of factorization'); fprintf('\n'); disp(' Second super-diagonal of U'); disp(du2'); disp(' First super-diagonal of U'); disp(duf); disp(' Main diagonal of U'); disp(df(1:4)); disp(df(5:end)); disp(' Multipliers'); disp(dlf); disp(' Vector of interchanges'); disp(double(ipiv)');
f07cr example results Details of factorization Second super-diagonal of U 2.0000 - 1.0000i -1.0000 - 1.0000i 1.0000 + 1.0000i First super-diagonal of U -1.3000 + 1.3000i -1.3000 + 3.3000i -0.3000 + 4.3000i -3.3000 + 1.3000i Main diagonal of U 1.0000 - 2.0000i 1.0000 + 1.0000i 2.0000 - 3.0000i 1.0000 + 1.0000i -1.3399 + 0.2875i Multipliers -0.7800 - 0.2600i 0.1620 - 0.4860i -0.0452 - 0.0010i -0.3979 - 0.0562i Vector of interchanges 2 3 4 5 5