keep_rank.m

From Spinach Documentation Wiki
Revision as of 15:03, 5 April 2026 by Kuprov (talk | contribs) (Sync syntax/arguments/outputs with current Spinach source)
Jump to: navigation, search


Truncates the singular value decomposition at the specified rank and reassembles the matrix.

Syntax

A=keep_rank(A,nsvk)

Arguments

A - real or complex matrix, will be

                 converted to full if a sparse
                 matrix is received
        nsvk  -  number of singular values to keep

Outputs

A - filtered matrix, returned as full

See also

Numerical infrastructure, frob_chop.m, ttclass/shrink.m


Version 2.5, authors: Ilya Kuprov