PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dgbbrd (f08le)
Purpose
nag_lapack_dgbbrd (f08le) reduces a real by band matrix to upper bidiagonal form.
Syntax
[
ab,
d,
e,
q,
pt,
c,
info] = f08le(
vect,
m,
kl,
ku,
ab,
c, 'n',
n, 'ncc',
ncc)
[
ab,
d,
e,
q,
pt,
c,
info] = nag_lapack_dgbbrd(
vect,
m,
kl,
ku,
ab,
c, 'n',
n, 'ncc',
ncc)
Description
nag_lapack_dgbbrd (f08le) reduces a real by band matrix to upper bidiagonal form by an orthogonal transformation: . The orthogonal matrices and , of order and respectively, are determined as a product of Givens rotation matrices, and may be formed explicitly by the function if required. A matrix may also be updated to give .
The function uses a vectorizable form of the reduction.
References
None.
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Indicates whether the matrices
and/or
are generated.
- Neither nor is generated.
- is generated.
- is generated.
- Both and are generated.
Constraint:
, , or .
- 2:
– int64int32nag_int scalar
-
, the number of rows of the matrix .
Constraint:
.
- 3:
– int64int32nag_int scalar
-
The number of subdiagonals, , within the band of .
Constraint:
.
- 4:
– int64int32nag_int scalar
-
The number of superdiagonals, , within the band of .
Constraint:
.
- 5:
– double array
-
The first dimension of the array
ab must be at least
.
The second dimension of the array
ab must be at least
.
The original
by
band matrix
.
The matrix is stored in rows
to
, more precisely, the element
must be stored in
- 6:
– double array
-
The first dimension,
, of the array
c must satisfy
- if , ;
- if , .
The second dimension of the array
c must be at least
.
An by matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
ab.
, the number of columns of the matrix .
Constraint:
.
- 2:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
c.
, the number of columns of the matrix .
Constraint:
.
Output Parameters
- 1:
– double array
-
The first dimension of the array
ab will be
.
The second dimension of the array
ab will be
.
ab stores values generated during the reduction.
- 2:
– double array
-
The diagonal elements of the bidiagonal matrix .
- 3:
– double array
-
The superdiagonal elements of the bidiagonal matrix .
- 4:
– double array
-
The first dimension,
, of the array
q will be
- if or , ;
- otherwise .
The second dimension of the array
q will be
if
or
and
otherwise.
If
or
, contains the
by
orthogonal matrix
.
If
or
,
q is not referenced.
- 5:
– double array
-
The first dimension,
, of the array
pt will be
- if or , ;
- otherwise .
The second dimension of the array
pt will be
if
or
and
otherwise.
The
by
orthogonal matrix
, if
or
. If
or
,
pt is not referenced.
- 6:
– double array
-
The first dimension,
, of the array
c will be
- if , ;
- if , .
The second dimension of the array
c will be
.
c stores
. If
,
c is not referenced.
- 7:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
vect, 2:
m, 3:
n, 4:
ncc, 5:
kl, 6:
ku, 7:
ab, 8:
ldab, 9:
d, 10:
e, 11:
q, 12:
ldq, 13:
pt, 14:
ldpt, 15:
c, 16:
ldc, 17:
work, 18:
info.
It is possible that
info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
Accuracy
The computed bidiagonal form
satisfies
, where
is a modestly increasing function of
, and
is the
machine precision.
The elements of themselves may be sensitive to small perturbations in or to rounding errors in the computation, but this does not affect the stability of the singular values and vectors.
The computed matrix
differs from an exactly orthogonal matrix by a matrix
such that
A similar statement holds for the computed matrix
.
Further Comments
The total number of real floating-point operations is approximately the sum of:
- , if and , and
- , if is updated, and
- , if either or is generated (double this if both),
where
, assuming
. For this section we assume that
The complex analogue of this function is
nag_lapack_zgbbrd (f08ls).
Example
This example reduces the matrix
to upper bidiagonal form, where
Open in the MATLAB editor:
f08le_example
function f08le_example
fprintf('f08le example results\n\n');
m = int64(6);
n = int64(4);
kl = int64(2);
ku = int64(1);
ab = [ 0.00, -1.28, -0.31, -0.35;
-0.57, 1.08, 0.40, 0.08;
-1.93, 0.24, -0.66, -2.13;
2.30, 0.64, 0.15, 0.50];
c = [];
vect = 'No Q or PT';
[abf, d, e, q, pt, c, info] = f08le( ...
vect, m, kl, ku, ab, c);
fprintf('Diagonal:\n');
fprintf(' %8.4f',d);
fprintf('\nOff-diagonal (absolute values):\n');
fprintf(' %8.4f',abs(e));
fprintf('\n');
f08le example results
Diagonal:
3.0561 1.5259 0.9690 1.5685
Off-diagonal (absolute values):
0.6206 1.2353 1.1240
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015