nag_file_print_matrix_complex_band_comp (x04df) prints a complex band matrix stored in
a
packed
two-dimensional array,
using a format specifier supplied by you.
The matrix is output to the unit defined by
nag_file_set_unit_advisory (x04ab).
None.
None.
Not applicable.
None.
function x04df_example
fprintf('x04df example results\n\n');
nmax = 5;
b = zeros(nmax,nmax);
for j = 1:nmax
b(j,:) = [1:nmax] + 10*j;
end
a = b - i*b;
mtitle = 'Example 1:';
m = int64(nmax);
n = m;
kl = int64(1);
ku = kl;
usefrm = 'Bracketed';
format = ' ';
labrow = 'Integer';
labcol = labrow;
rlabs = {' '};
clabs = {' '};
ncols = int64(80);
indent = int64(0);
[ifail] = x04df( ...
m, n, kl, ku, a, usefrm, format, mtitle, labrow, ...
rlabs, labcol, clabs, ncols, indent);
fprintf('\n');
mtitle = 'Example 2:';
m = int64(nmax-1);
n = m;
kl = int64(1);
ku = int64(2);
usefrm = 'Direct';
format = 'SS,F7.1,SP,F6.1,''i''';
labrow = 'Character';
labcol = labrow;
rlabs = {'Uno '; 'Due '; 'Tre '; 'Quattro'};
clabs = {'Un '; 'Deux '; 'Trois '; 'Quatre '};
[ifail] = x04df( ...
m, n, kl, ku, a, usefrm, format, mtitle, labrow, ...
rlabs, labcol, clabs, ncols, indent);
fprintf('\n Example 3:\n');
mtitle = 'A';
usefrm = ' ';
format = 'MATLABF7.1';
labrow = 'No labels';
labcol = labrow;
[ifail] = x04df( ...
m, n, kl, ku, a, usefrm, format, mtitle, labrow, ...
rlabs, labcol, clabs, ncols, indent);
x04df example results
Example 1:
1 2
1 ( 21.0000, -21.0000) ( 12.0000, -12.0000)
2 ( 31.0000, -31.0000) ( 22.0000, -22.0000)
3 ( 32.0000, -32.0000)
4
5
3 4
1
2 ( 13.0000, -13.0000)
3 ( 23.0000, -23.0000) ( 14.0000, -14.0000)
4 ( 33.0000, -33.0000) ( 24.0000, -24.0000)
5 ( 34.0000, -34.0000)
5
1
2
3
4 ( 15.0000, -15.0000)
5 ( 25.0000, -25.0000)
Example 2:
Un Deux Trois Quatre
Uno 31.0 -31.0i 22.0 -22.0i 13.0 -13.0i
Due 41.0 -41.0i 32.0 -32.0i 23.0 -23.0i 14.0 -14.0i
Tre 42.0 -42.0i 33.0 -33.0i 24.0 -24.0i
Quattro 43.0 -43.0i 34.0 -34.0i
Example 3:
A = [
( 31.0 -31.0i) ( 22.0 -22.0i) ( 13.0 -13.0i) ( 0.0 +0.0i);
( 41.0 -41.0i) ( 32.0 -32.0i) ( 23.0 -23.0i) ( 14.0 -14.0i);
( 0.0 +0.0i) ( 42.0 -42.0i) ( 33.0 -33.0i) ( 24.0 -24.0i);
( 0.0 +0.0i) ( 0.0 +0.0i) ( 43.0 -43.0i) ( 34.0 -34.0i);
];