Command Reference : Matrix Language Reference
Syntax: @svd(m1, v1, m2)
Argument 1: matrix or sym, m1
Argument 2: vector, v1
Argument 3: matrix or sym, m2
Return: matrix
Performs an “economy” or “thin” singular value decomposition of the matrix m1, generating truncated results when m1 is not square (exploiting the reduced maximum rank of a non-square matrix). The matrix is returned by the function, the vector v1 will be filled (resized if necessary) with the singular values and the matrix m2 will be assigned (resized if necessary) the other matrix, , of the decomposition. The singular value decomposition satisfies:
where is a diagonal matrix with the singular values along the diagonal. Singular values close to zero indicate that the matrix may not be of full rank. See the @rank function for a related discussion.
Let r be the number of rows of m1 and s be the number of columns of m1. m1 has at most t = min(r, s) distinct singular values. Consequently, will have dimensions r-by-t, v1 will be t-by-1, and m2 will be s-by-t.
matrix m2
vector v1
matrix m3 = @svd(m1,v1,m2)