clean_up.m
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
Version 2.3, authors: Ilya Kuprov, Alex Nevzorov