create sparse matrix from diagonal arrays
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Andrew Newell
el 10 de Abr. de 2014
0 votos
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 comentarios
Jack Silver
el 11 de Abr. de 2014
Andrew Newell
el 11 de Abr. de 2014
I'm still having trouble understanding what you mean. Could you attach a file with some data?
Jack Silver
el 24 de Abr. de 2014
0 votos
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!