Possible Duplicate:
MATLAB: maximum pre-allocated size?
Is there a size limitation on creating a matrix in MATLAB? If so, where can I locate this information?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Memory is limited in Matlab only by the amount of memory (including virtual memory) made available to it by the operating system. Matrices are stored in memory as contiguous space, so if you have a matrix that would occupy 8GB of memory, you would need one big chunk of 8GB to be available to you in memory.
You can use the
memorycommand to provide detailed statistics about the memory available to you, including the amount of contiguous memory available for a single matrix. For example:To calculate the array size that the
Maximum possible arrayvalue corresponds to, you simply divide by the number of bytes required by each array elements. From thememorydocumentation:Mathworks also provides detailed documentation on how to avoid
Out of Memoryerrors here.