How intelligently does Matlab deal with sparse matrix operations?
이전 댓글 표시
I am curious about how Matlab deals with sparse matrices:
Knowing that all of the matrices I am operating on are defined as (or built as) sparse matrices throughout my code (e.g., A = spalloc(n,n,nzmax), and then elements are added to A), can I be sure that Matlab is dealing with them intelligently when I loop through the elements in a row and perform arithmetic operations? Meaning, do I need to do anything in particular to ensure that Matlab only deals with the nonzero elements in a sparse matrix, or will the "sparse" designation handle that for me under the hood?
Thanks in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Sparse Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!