help using sparse matrix
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kobi
am 12 Feb. 2014
Kommentiert: Jos (10584)
am 13 Feb. 2014
i have a big matrix 10e3x10e3 with small values 1e-10,1e-2,to save memory and speed i need the sparse function to not only ignore the zero elements but also those very small elements in the range (1e-10,1e-2) is it possible?
0 Kommentare
Akzeptierte Antwort
the cyclist
am 12 Feb. 2014
Bearbeitet: the cyclist
am 12 Feb. 2014
You could preprocess your matrix with a step like
M(abs(M)<1.e-2) = 0;
and then make it sparse.
0 Kommentare
Weitere Antworten (1)
Kobi
am 13 Feb. 2014
2 Kommentare
Jos (10584)
am 13 Feb. 2014
The expression " a(abs(a)<1.e-2) " selects those elements from a that have an absolute value smaller than 1e-2. You do not want to select them, but set those elements to a zero
a(abs(a)<1e-2) = 0
Siehe auch
Kategorien
Mehr zu Sparse Matrices finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!