| MATLAB Environment | Search  Help Desk |
Memory Utilization
Memory Usage in MATLAB
MATLAB requires a contiguous area of memory to store each matrix. In particular, images and movies can consume large amounts of memory.Resolving Memory Errors
If you do not have a "chunk" of memory large enough to allocate a matrix, an out of memory error may occur even though you seem to have enough available memory. To consolidate the fragmented memory, you can use the MATLABpack command, or you can allocate larger matrices earlier in the MATLAB session.
If you run out of memory often, use these tips:
For Windows, increase virtual memory by using System Properties for Performance, which you can access from the Control Panel.
For UNIX, ask your system manager to increase your swap space. For VAX/VMS, ask your system manager to increase your working set and/or pagefile quota.