problem in preallocation
Info
This question is closed. Reopen it to edit or answer.
Show older comments
hi, I used data with huge size, so I did preallocation A(147611,30977)=zeros But , I got this message: ??? Maximum variable size allowed by the program is exceeded.
what i have to do in this case?
thanks in advance
Answers (1)
Titus Edelhofer
on 10 Nov 2011
0 votes
Hi Huda,
before going on waht you can do other, you are aware, that a matrix of size 147611x30977 will need approx. 34GB of memory?
Titus
6 Comments
huda nawaf
on 10 Nov 2011
Titus Edelhofer
on 10 Nov 2011
Either use sparse matrices or process your data in chunks instead of one large matrix ... Other then this general advice would require some words where your huge data comes from and what you want to do with it ...
huda nawaf
on 10 Nov 2011
Titus Edelhofer
on 10 Nov 2011
Hi,
1.92GB is large, but still far away from 34. How did you get to the size 147611x30977? Are the numbers in the file only integers? If you read them from file, you don't need to preallocate (depending on how you read).
Titus
huda nawaf
on 10 Nov 2011
Walter Roberson
on 10 Nov 2011
I do wonder whether the "social network"'s web site's Terms and Conditions allow this use of the data?
Anyhow, sounds to me like a good place to use cell arrays, or perhaps struct.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!