Increase limit on Matrix size
Ältere Kommentare anzeigen
Hi,
Presently matlab has put a limit of 10k on max array dimension. Matlab is not allowing me to use more than that. How can we increase it?
Thanks
2 Kommentare
Walter Roberson
am 5 Feb. 2016
Do you mean that you want ndims() of the array to be greater than 10000, or do you mean that you want one particular dimension of an array to be that large?
Did you accidentally use
A = zeros(1:10000)
instead of
A = zeros(1,10000)
Walter Roberson
am 5 Feb. 2016
I just created an array with over 100 million dimensions.
Akzeptierte Antwort
Weitere Antworten (1)
Nicole Rappaport
am 23 Mär. 2019
0 Stimmen
my program needs to use a matrix of dimension 100,000 x 100,000 x 100,000. The responses I read above are too sophisticated for me. Could someone tell me a simple way to allow this? By the way, I am talking about MATLAB.
Thanks in advance,
Nicole
3 Kommentare
Steven Lord
am 23 Mär. 2019
An int8, uint8, or logical array that size requires a contiguous block of memory 1 petabyte in size (ask Google to compute "100000 times 100000 times 100000 bytes in petabytes") and a real double array that size will require 8 times as much memory. I feel safe in assuming that your computer doesn't have that much memory. You're going to need to rethink your approach.
Walter Roberson
am 23 Mär. 2019
It is not possible to do that unless the array is sparse.
Even if your array was uint8 or logical, it would require 10^15 bytes of memory, which exceeds 2^49 bytes, but the x64 architecture has a limit of 2^48 bytes on all known implementations.
The largest publicly known computer memory in the world is an HP server with 160 terabytes of memory https://www.forbes.com/sites/aarontilley/2017/05/16/hpe-160-terabytes-memory/ . Even with uint8 values, the array you want to create is more than 5 times larger than that. You would need 6 of those Largest Computer in the World to fit your array. And if your array was double precision, you would need 46 of them.
Steven Lord
am 23 Mär. 2019
To put it another way, Wikipedia states that 'as of March 2014 "the Library [U.S. Library of Congress] has collected about 525 terabytes of web archive data" and that it adds about 5 terabytes per month ("one terabyte = 1,024 gigabytes").' At that rate, the Library will have 1 petabyte (1000 terabytes) of web archive data:
>> startDate = datetime('March 1, 2014');
>> terabytesToAdd = 1000-525;
>> monthsToAdd = terabytesToAdd/5;
>> timeReaching1PB = startDate + calmonths(monthsToAdd)
timeReaching1PB =
datetime
01-Feb-2022
a couple years from now.
Kategorien
Mehr zu Parallel and Cloud 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!