Can I have array of sparse matrices?

7 ビュー (過去 30 日間)
Jakub Závada
Jakub Závada 2015 年 5 月 9 日
編集済み: James Tursa 2015 年 5 月 10 日
I have array of matrices. Every matrix has only one non-zero element in every row. So I want to save it as array of sparse matrices. How can I do it? sparse(A) where A is array of matrices returns error "Undefined function 'sparse' for input arguments of type 'double' and attributes 'full 3d real'."

採用された回答

John D'Errico
John D'Errico 2015 年 5 月 9 日
You CAN have a cell array of sparse matrices. So every cell may contain a sparse matrix. But you cannot have a sparse 3-d matrix.

その他の回答 (1 件)

James Tursa
James Tursa 2015 年 5 月 10 日
編集済み: James Tursa 2015 年 5 月 10 日
Yes, but not directly with inbuilt MATLAB functionality. Instead, you can use this FEX submission by Matt J:

カテゴリ

Help Center および File ExchangeSparse Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by