Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Minimum norm least-squares solution to linear equation

`X = lsqminnorm(A,B)`

`X = lsqminnorm(A,B,tol)`

`X = lsqminnorm(___,rankWarn)`

The minimum-norm solution computed by

`lsqminnorm`

is of particular interest when several solutions exist. The equation*Ax = b*has many solutions whenever`A`

is underdetermined (fewer rows than columns) or of low rank.`lsqminnorm(A,B,tol)`

is typically more efficient than`pinv(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 of`A`

, while`pinv`

uses the singular value decomposition (SVD). Therefore, the results of`pinv`

and`lsqminnorm`

do not match exactly.For sparse matrices,

`lsqminnorm`

uses a different algorithm than for dense matrices, and therefore can produce different results.

Was this topic helpful?