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