MATLAB: Matlab is giving an “out of memory” error while only using a fraction of the RAM. Is there an artificial RAM limit in the settings somewhere

memory

It says I'm only using 1.3 GB of RAM, when I actually have 16 GB, but it's saying I don't have enough. How can I allow it to use more RAM? I'm running 2017b 64bit on a Windows 10 pc.
>> memory
Maximum possible array: 8573 MB (8.989e+09 bytes) *
Memory available for all arrays: 8573 MB (8.989e+09 bytes) *
Memory used by MATLAB: 1339 MB (1.404e+09 bytes)
Physical Memory (RAM): 16307 MB (1.710e+10 bytes)
I'm guessing I have to adjust the 'Memory available for all arrays' somehow?
I ran the same script on another PC with 16 GB of RAM and it worked fine.

Best Answer

I figured out what was wrong, I wanted to make a 1x52560 vector, but I wrote the script wrong so it tried to make a 52560x52560, and that one variable was consuming all of my RAM.