How could MATLAB store large scale of data.
Show older comments
Hi, All,
I have to use a dataset as large as ones(3^N1,3^N2,10^3), where N1 and N2 can be 7~14. However, matlab will report "Out of memory" even for ones(3^14,1000). Is there a way to let matlab store such a large array.
I can split my data to several parts and store the sub-data. However that is very inconvenient.
I wonder if MATLAB can extend the limit, and handle large scale data. Thanks.
Accepted Answer
More Answers (1)
If your data is sparse, you can build 1000 sparse matrices or use some FEX function that will allow you to create ND sparse matrices.
The ones(3^14, 1000) that you tried to evaluate would take more than 38GB RAM to be stored as double. It certainly indicates that your approach is not appropriate. One thing that you could do though, is to store your data using a "smaller" type/class, i.e. any decent enough type (for the nature of your data) that is stored on 1, 2, or 4 bytes. If your data were made of unsigned integers in the range 0-255, you could use uint8 that would require 1 byte per element instead of 8.
Categories
Find more on Report Setup 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!