Matlab array size limit
Matlab array size limit attempts to stop the user from creating individual arrays that dig into swap memory. Using swap memory is normally undesirable for data computations because the swap memory can be several orders of magnitude slower than RAM.
However, Matlab doesn’t check the total size of all arrays in the workspace, so the user must be mindful of memory management as in any programming langauge or data processing task.
The matlab-stdlib ram_free function tells the physical free RAM in bytes across operating systems for Matlab or GNU Octave.
Related: free disk space check Matlab