Computes various norms of a matrix stored in band storage mode.
#include <imsl.h>
float imsl_f_matrix_norm_band (int n, float a[], int nlc, int nuc, ..., 0)
The type double function is imsl_d_matrix_norm_band.
int n
(Input)
The order of matrix A.
float a[]
(Input)
Matrix for which the norm will be computed.
int nlc
(Input)
Number of lower codiagonals of A.
int nuc
(Input)
Number of upper codiagonals of A.
The requested norm of the input matrix, by default, the Frobenius norm. If the norm cannot be computed, NaN is returned.
#include <imsl.h>
float
imsl_f_matrix_norm_band (int n, float a[], int nlc,
int nuc,
IMSL_ONE_NORM,
IMSL_INF_NORM,
IMSL_SYMMETRIC,
0)
IMSL_ONE_NORM,
Compute the 1-norm of matrix A,
IMSL_INF_NORM,
Compute the infinity norm of matrix A,
IMSL_SYMMETRIC,
Matrix
A is stored in band symmetric storage mode.
By default, imsl_f_matrix_norm_band computes the Frobenius norm

If the option IMSL_ONE_NORM is selected, the 1-norm

is returned. If the option IMSL_INF_NORM is selected, the infinity norm

is returned.
Compute the Frobenius norm, infinity norm, and one norm of matrix A. Matrix A is stored in band storage mode.
#include <imsl.h>
void main()
{
float a[] = {0.0, 2.0, 3.0, -1.0,
1.0, 1.0, 1.0, 1.0,
0.0, 3.0, 4.0, 0.0};
int nlc = 1, nuc = 1;
int n = 4;
float frobenius_norm, inf_norm, one_norm;
frobenius_norm
= imsl_f_matrix_norm_band(n, a, nlc, nuc, 0);
inf_norm =
imsl_f_matrix_norm_band(n, a, nlc, nuc,
IMSL_INF_NORM, 0);
one_norm =
imsl_f_matrix_norm_band(n, a, nlc, nuc,
IMSL_ONE_NORM, 0);
printf("Frobenius norm = %f\n", frobenius_norm);
printf("Infinity norm = %f\n", inf_norm);
printf("One norm = %f\n", one_norm);
}
Frobenius norm = 6.557438
Infinity norm = 5.000000
One norm = 8.000000
Compute the Frobenius norm, infinity norm, and one norm of matrix A. Matrix A is stored in symmetric band storage mode.
#include <imsl.h>
void main()
{
float a[] = {0.0, 0.0, 7.0, 3.0, 1.0, 4.0,
0.0, 5.0, 1.0, 2.0, 1.0, 2.0,
1.0, 2.0, 4.0, 6.0, 3.0, 1.0};
int nlc = 2, nuc = 2;
int n = 6;
float frobenius_norm, inf_norm, one_norm;
frobenius_norm = imsl_f_matrix_norm_band(n, a, nlc, nuc,
IMSL_SYMMETRIC, 0);
inf_norm = imsl_f_matrix_norm_band(n, a, nlc, nuc,
IMSL_INF_NORM,
IMSL_SYMMETRIC, 0);
one_norm = imsl_f_matrix_norm_band(n, a, nlc, nuc,
IMSL_ONE_NORM,
IMSL_SYMMETRIC, 0);
printf("Frobenius norm = %f\n", frobenius_norm);
printf("Infinity norm = %f\n", inf_norm);
printf("One norm = %f\n", one_norm);
}
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |