Open in the MATLAB editor: f07ff_example
function f07ff_example fprintf('f07ff example results\n\n'); % Upper triangular part of symmetric matrix A a = [ 4.16 -3.12e+05 0.56 -0.10 ; 0 5.03e+10 -8.30e+04 1.18e+05; 0 0 0.76 0.34 ; 0 0 0 1.18 ]; % Scale A [s, scond, amax, info] = f07ff(a); fprintf('scond = %8.1e, amax = %8.1e\n\n', scond, amax); disp('Diagonal scaling factors'); fprintf('%10.1e',s); fprintf('\n\n'); % Scaled matrix as = diag(s)*a*diag(s); [ifail] = x04ca( ... 'Upper', 'Non-unit', as, 'Scaled matrix');
f07ff example results scond = 3.9e-06, amax = 5.0e+10 Diagonal scaling factors 4.9e-01 4.5e-06 1.1e+00 9.2e-01 Scaled matrix 1 2 3 4 1 1.0000 -0.6821 0.3149 -0.0451 2 1.0000 -0.4245 0.4843 3 1.0000 0.3590 4 1.0000