What's the reason for different memory consumption for sparse row and column vectors?
Show older comments
See below:
>> a = sparse(1e12,1);
>> b = sparse(1,1e9);
>> whos a b
Name Size Bytes Class Attributes
a 1000000000000x1 32 double sparse
b 1x1000000000 8000000024 double sparse
>> clear all
>> c = sparse(1,1e10);
Error using sparse
Requested 1x10000000000 (74.5GB) array exceeds maximum array size preference.
Creation of arrays greater than this limit may take a long time and cause
MATLAB to become unresponsive. See array size limit or preference panel for
more information.
Accepted Answer
More Answers (1)
Walter Roberson
on 3 Sep 2016
0 votes
Categories
Find more on Logical 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!