singular value decomposition
s=svd(X) [U,S,V]=svd(X) [U,S,V]=svd(X,"e") [U,S,V,rk]=svd(X [,tol])
a real or complex matrix
real vector (singular values)
real diagonal matrix (singular values)
orthogonal or unitary square matrices (singular vectors).
real number
[U,S,V] = svd(X) produces a diagonal matrix
S , of the same dimension as X and with
nonnegative diagonal elements in decreasing order, and unitary
matrices U and V so that X = U*S*V'.
[U,S,V] = svd(X,"e") produces the "economy
size" decomposition. If X is m-by-n with m >
n, then only the first n columns of U are computed
and S is n-by-n.
s= svd(X) by itself, returns a vector s
containing the singular values.
[U,S,V,rk]=svd(X,tol) gives in addition rk, the numerical rank of X i.e. the number of
singular values larger than tol.
The default value of tol is the same as in rank.
svd decompositions are based on the Lapack routines DGESVD for real matrices and ZGESVD for the complex case.
| Version | Description |
| 2023.0.0 | svd(X, 0) is obsolete, use svd(X, "e") instead. |
| 2024.0.0 | svd(X, 0) is no more supported, use svd(X, "e") instead. |