How much data can MATLAB handle?
I have to do lots of computing with a matrix of 200,00开发者_开发知识库0
(or more) rows and 100
or 200
columns.
- What is the memory threshold of MATLAB?
- Can MATLAB handle a giant matrix?
The problem is, it depends on what version of matlab you have. It depends on how much memory you have. It depends on the largest piece of contiguous memory available to you. So any answer will potentially be vague, since we don't know what you have!
How many elements are there? This is done by the simple artifice of multiplication. 2e5*200 = 4e7 elements. So 40,000,000 elements.
How much storage does this consume? Assuming these are doubles, each elements requires 8 bytes of memory. 4e7*8 = 3.2e8 bytes of memory, or roughly 0.32 gigabytes of RAM. Do you have this much memory available? That I cannot say. If you are running a 32 bit version of MATLAB on Windoze, it might just barely fit. The possession of 8 gigs of RAM is irrelevant if you cannot address it all, or if your OS won't let you see it all.
If you are running 64 bit MATLAB on a system with 8 gigs of RAM, you will have no problems in storing this array.
You can see the memory available one SOME systems using the memory function in MATLAB.
Recommend to read this documents from Mathworks:
- Avoiding 'Out of Memory' Errors
- Memory Management Guide
- Strategies for Efficient Use of Memory
- Resolving "Out of Memory" Errors
Oh, yes. back in the days of college when x386 computers came out we were amazed that it took matlab 0.5seconds to invert a 1000x1000 random matrix. Nowadays the limits have to do with how much contiguous memory is available at any time.
精彩评论