create sparse matrix from diagonal arrays
Afficher commentaires plus anciens
I have the 7 diagonal that come from a 3D finite volume discretization in separate arrays. These 7 arrays have 3D shape and correspond to each elements of the stencil for all points: top, bottom, east, west, north south and central point. I would like to create a sparse matrix object from these arrays, but I feel a little lost with the spdiag documentation. Help would be gratly apreaciated.
Réponse acceptée
Plus de réponses (2)
Andrew Newell
le 10 Avr 2014
0 votes
MATLAB supports sparse matrices, but for 3D arrays you'll need to visit the File Exchange and get N-dimensional sparse arrays by Matt J.
2 commentaires
Jack Silver
le 11 Avr 2014
Andrew Newell
le 11 Avr 2014
I'm still having trouble understanding what you mean. Could you attach a file with some data?
Jack Silver
le 24 Avr 2014
0 votes
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!