Can I have array of sparse matrices?
5 次查看(过去 30 天)
显示 更早的评论
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'."
0 个评论
采纳的回答
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.
0 个评论
更多回答(1 个)
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:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!