help using sparse matrix
古いコメントを表示
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?
採用された回答
その他の回答 (1 件)
Kobi
2014 年 2 月 13 日
2 件のコメント
Jos (10584)
2014 年 2 月 13 日
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
Jos (10584)
2014 年 2 月 13 日
… and only after that convert those a to sparse!
カテゴリ
ヘルプ センター および File Exchange で Sparse Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!