Difference between revisions of "Keep rank.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(→‎See also)
(Sync syntax/arguments/outputs with current Spinach source)
Line 1: Line 1:
 
{{DISPLAYTITLE:keep_rank.m}} __NOTOC__
 
{{DISPLAYTITLE:keep_rank.m}} __NOTOC__
 +
 
Truncates the singular value decomposition at the specified rank and reassembles the matrix.
 
Truncates the singular value decomposition at the specified rank and reassembles the matrix.
  
 
==Syntax==
 
==Syntax==
  
−
    A=keep_rank(A,rank)
+
A=keep_rank(A,nsvk)
  
 
==Arguments==
 
==Arguments==
  
−
        A    -  real or complex matrix, will be  
+
A    -  real or complex matrix, will be
 
                   converted to full if a sparse
 
                   converted to full if a sparse
 
                   matrix is received
 
                   matrix is received
−
+
 
−
         rank -  number of singular values to keep
+
         nsvk -  number of singular values to keep
  
 
==Outputs==
 
==Outputs==
  
−
        A    -  filtered matrix, returned as full
+
A    -  filtered matrix, returned as full
  
 
==See also==
 
==See also==
 +
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]], [[frob_chop.m]], [[ttclass/shrink.m]]
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]], [[frob_chop.m]], [[ttclass/shrink.m]]
  
  
 
''Version 2.5, authors: [[Ilya Kuprov]]''
 
''Version 2.5, authors: [[Ilya Kuprov]]''

Revision as of 15:03, 5 April 2026


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