Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

?gelsd

Computes the minimum-norm solution to a linear least squares problem using the singular value decomposition of A and a divide and conquer method.

Syntax

call sgelsd
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
iwork
,
info
)
call dgelsd
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
iwork
,
info
)
call cgelsd
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
rwork
,
iwork
,
info
)
call zgelsd
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
rwork
,
iwork
,
info
)
call gelsd
(
a
,
b
[
,
rank
]
[
,
s
]
[
,
rcond
]
[
,
info
]
)
Include Files
  • mkl.fi
    ,
    lapack.f90
Description
The routine computes the minimum-norm solution to a real linear least squares problem:
minimize ||
b
-
A
*
x
||
2
using the singular value decomposition (SVD) of
A
.
A
is an
m
-by-
n
matrix which may be rank-deficient.
Several right hand side vectors
b
and solution vectors
x
can be handled in a single call; they are stored as the columns of the
m
-by-
nrhs
right hand side matrix
B
and the
n
-by-
nrhs
solution matrix
X
.
The problem is solved in three steps:
  1. Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS).
  2. Solve the BLS using a divide and conquer approach.
  3. Apply back all the Householder transformations to solve the original least squares problem.
The effective rank of
A
is determined by treating as zero those singular values which are less than
rcond
times the largest singular value.
The routine uses auxiliary routines lals0 and lalsa.
Input Parameters
m
INTEGER
.
The number of rows of the matrix
A
(
m
0
).
n
INTEGER
.
The number of columns of the matrix
A
(
n
0
).
nrhs
INTEGER
.
The number of right-hand sides; the number of columns in
B
(
nrhs
<