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.

Singular value decomposition

`s = svd(A)`

```
[U,S,V]
= svd(A)
```

```
[U,S,V]
= svd(A,'econ')
```

```
[U,S,V]
= svd(A,0)
```

returns
the singular
values of matrix `s`

= svd(`A`

)`A`

in descending order.

`[`

produces an economy-size
decomposition of `U`

,`S`

,`V`

]
= svd(`A`

,'econ')`m`

-by-`n`

matrix `A`

:

`m > n`

— Only the first`n`

columns of`U`

are computed, and`S`

is`n`

-by-`n`

.`m = n`

—`svd(A,'econ')`

is equivalent to`svd(A)`

.`m < n`

— Only the first`m`

columns of`V`

are computed, and`S`

is`m`

-by-`m`

.

The economy-size decomposition removes extra rows or columns
of zeros from the diagonal matrix of singular values, `S`

,
along with the columns in either `U`

or `V`

that
multiply those zeros in the expression `A = U*S*V'`

.
Removing these zeros and columns can improve execution time and reduce
storage requirements without compromising the accuracy of the decomposition.