FUNCTION REFERENCE

svds

A few singular values and vectors.

A few singular values and vectors.

Syntax

s = svds(A)

Syntax

s = svds(A, k)

Syntax

s = svds(A, k, sigma)

Syntax

[U, S, V, flag] = svds(A, k, sigma, opts)

Returns the k (default 6) largest singular values, or those nearest sigma (0 gives the smallest).

Example

svds(diag([3 1 2]), 1)   % 3

Differences from MATLAB: Computed densely, so results agree with MATLAB to about 1e-12 relative, not to every digit. Sparse input is not supported.

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