lsqminnorm
Minimum norm least-squares solution to linear equation
Description
X = lsqminnorm(
returns an array A
,B
)X
that solves the linear equation AX =
B and minimizes the value of norm(A*X-B)
. If
several solutions exist to this problem, then lsqminnorm
returns the solution that minimizes norm(X)
. If
B
has multiple columns, then the previous statements are true
for each column of X
and B
,
respectively.
Examples
Input Arguments
Tips
The minimum-norm solution computed by
lsqminnorm
is of particular interest when several solutions exist. The equation Ax = b has many solutions wheneverA
is underdetermined (fewer rows than columns) or of low rank.lsqminnorm(A,B,tol)
is typically more efficient thanpinv(A,tol)*B
for computing minimum norm least-squares solutions to linear systems.lsqminnorm
uses the complete orthogonal decomposition (COD) to find a low-rank approximation ofA
, whilepinv
uses the singular value decomposition (SVD). Therefore, the results ofpinv
andlsqminnorm
do not match exactly.For sparse matrices,
lsqminnorm
uses a different algorithm than for dense matrices, and therefore can produce different results.
Extended Capabilities
Version History
Introduced in R2017b