clean_up.m

From Spinach Documentation Wiki
Revision as of 18:47, 5 June 2026 by Kuprov (talk | contribs) (Rename Arguments section heading to Parameters)
Jump to: navigation, search

Array clean-up utility. Drops non-zero elements with magnitude below the user-specified tolerance and converts between sparse and full storage de pending on the density of non-zeroes in the array.

Syntax

    A=clean_up(spin_system,A,nonzero_tol)

Parameters

    A  - a numerical array or a cell array thereof

    nonzero_tol - nonzero tolerance

Outputs

    A  - cleaned-up array

See also

tolerances.m, mprealloc.m

Version 2.3, authors: Ilya Kuprov, Alex Nevzorov