Can I have array of sparse matrices?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jakub Závada
le 9 Mai 2015
Modifié(e) : James Tursa
le 10 Mai 2015
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 commentaires
Réponse acceptée
John D'Errico
le 9 Mai 2015
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 commentaires
Plus de réponses (1)
James Tursa
le 10 Mai 2015
Modifié(e) : James Tursa
le 10 Mai 2015
Yes, but not directly with inbuilt MATLAB functionality. Instead, you can use this FEX submission by Matt J:
0 commentaires
Voir également
Catégories
En savoir plus sur Sparse Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!