Developer Reference

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

?gelss

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

Syntax

call sgelss
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
info
)
call dgelss
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
info
)
call cgelss
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
rwork
,
info
)
call zgelss
(
m
,
n
,
nrhs
,
a
,
lda
,
b
,
ldb
,
s
,
rcond
,
rank
,
work
,
lwork
,
rwork
,
info
)
call gelss
(
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 effective rank of
A
is determined by treating as zero those singular values which are less than
rcond
times the largest singular value.
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
0
).
a
,
b
,
work
REAL
for
sgelss
DOUBLE PRECISION
for
dgelss
COMPLEX
for
cgelss
DOUBLE COMPLEX
for
zgelss
.
Arrays:
a
(
lda
,*)
contains the
m
-by-
n
matrix
A
.