FUNCTION REFERENCE

svd

Singular values and singular vectors.

Singular values and singular vectors.

Syntax

s = svd(A)

Syntax

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

Syntax

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

Syntax

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

One output returns singular values in descending order as a column. Three outputs satisfy A approximately equal to U*S*V'. For m-by-n input and k=min(m,n), full output sizes are m-by-m, m-by-n and n-by-n. 'econ' gives m-by-k, k-by-k and n-by-k; option 0 uses economy only when m>n. Inputs must be finite and may be complex (S stays real); logical input converts to double.

Example

svd([1 2;3 4;5 6])   % [9.525518; 0.514301]

Differences from MATLAB: Singular vector signs (complex phases) and small singular values can differ; complex singular values can differ in the last digit, and a singular complex matrix can give an exact 0 where MATLAB gives about 1e-16. Two outputs are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.