create sparse matrix from diagonal arrays
Show older comments
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.
Accepted Answer
More Answers (2)
Andrew Newell
on 10 Apr 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 Comments
Jack Silver
on 11 Apr 2014
Andrew Newell
on 11 Apr 2014
I'm still having trouble understanding what you mean. Could you attach a file with some data?
Jack Silver
on 24 Apr 2014
0 votes
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!