(the -norm of ), | |
(the -norm of ), | |
(the Frobenius norm of ), or | |
(the maximum absolute element value of ). |
Open in the MATLAB editor: f16rb_example
function f16rb_example fprintf('f16rb example results\n\n'); kl = int64(2); ku = int64(2); m = int64(6); a = [ 1, 1, 0, 0; 2, 2, 2, 0; 3, 3, 3, 3; 0, 4, 4, 4; 0, 0, 5, 5; 0, 0, 0, 6]; ab = zeros(5, 6); % Convert a to packed storage [a, ab, ifail] = f01zc( ... 'p', kl, ku, a, ab); fprintf('\nNorms of banded matrix ab:\n\n'); r_one = f16rb('o', m, kl, ku, ab); fprintf('One norm = %9.4f\n', r_one); r_inf = f16rb('i', m, kl, ku, ab); fprintf('Infinity norm = %9.4f\n', r_inf); r_fro = f16rb('f', m, kl, ku, ab); fprintf('Frobenious norm = %9.4f\n', r_fro); r_max = f16rb('m', m, kl, ku, ab); fprintf('Maximum norm = %9.4f\n', r_max);
f16rb example results Norms of banded matrix ab: One norm = 18.0000 Infinity norm = 12.0000 Frobenious norm = 13.5647 Maximum norm = 6.0000