svd
Singular value decomposition
Description
returns
the singular values
of matrix S
= svd(A
)A
in descending order.
[___]
= svd(
produces an economy-size decomposition of A
,"econ")A
using either of the
previous output argument combinations. If A
is an
m
-by-n
matrix, then:
m > n
— Only the firstn
columns ofU
are computed, andS
isn
-by-n
.m = n
—svd(A,"econ")
is equivalent tosvd(A)
.m < n
— Only the firstm
columns ofV
are computed, andS
ism
-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.
[___] = svd(
produces a different economy-size decomposition of
A
,0)m
-by-n
matrix A
:
m > n
—svd(A,0)
is equivalent tosvd(A,"econ")
.m <= n
—svd(A,0)
is equivalent tosvd(A)
.
The use of this syntax is not recommended. Use the "econ"
option instead.
[___] = svd(___,
optionally specifies the output format for the singular values. You can use this
option with any of the previous input or output argument combinations. Specify
outputForm
)"vector"
to return the singular values as a column vector, or
"matrix"
to return the singular values in a diagonal
matrix.