answersLogoWhite

0

Using sparse matrices to store data that contains a large number of zero-valued elements can both save a significant amount of memory and speed up the processing of that data. sparse is an attribute that you can assign to any two-dimensional MATLAB matrix that is composed of double or logical elements.

The sparse attribute allows MATLAB to:

  • Store only the nonzero elements of the matrix, together with their indices.

  • Reduce computation time by eliminating operations on zero elements.

For full matrices, MATLAB stores every matrix element internally. Zero-valued elements require the same amount of storage space as any other matrix element. For sparse matrices, however, MATLAB stores only the nonzero elements and their indices. For large matrices with a high percentage of zero-valued elements, this scheme significantly reduces the amount of memory required for data storage.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
ReneRene
Change my mind. I dare you.
Chat with Rene
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: What are advantages of a sparse matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp