create sparse matrix from diagonal arrays
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (2)
Andrew Newell
am 10 Apr. 2014
0 Stimmen
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 Kommentare
Jack Silver
am 11 Apr. 2014
Andrew Newell
am 11 Apr. 2014
I'm still having trouble understanding what you mean. Could you attach a file with some data?
Jack Silver
am 24 Apr. 2014
0 Stimmen
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!