Is there a way to change the "MATLAB array size limit" using commands?
I'm looking to change this setting (https://www.mathworks.com/help/matlab/matlab_env/set-workspace-and-variable-preferences.html) using commands on a different computer on a server using Terminal (UNIX). I'm trying to run a program that's got a whopping matrix but can't unless I check out what this setting is set to.
Thanks!
Posted Jun 21, 2018, 10:13 PM UTC
41
I dont think you can change it programatically. As of 2018a you can change some settings programatically using
But max array size isnt one that can seemingly be accessed from there.
The default is 100%, so if no one changed it then that is what it is.
Realistically, unless someone turned it down to a redicuously low #, you will be running deep into swap space before you hit the limit for the "max array size". This is the limit for 1 single array, but matlab will happily generate 1000 arrays, each of which are 99% of the limit, so long as none are over the limit.
You can check the setting if you connect to the machine using
ssh -Yand have an X server running. You may need to runor
or something similar.
Pro tip: if you connect with
ssh -Yand start matlab with the-nodisplayflag, you will get the terminal version of Matlab but still be able to generate figures and open things that require X11. I find this is a good tradeoff between being able to use X11 and not having it slow down your entire session unless you are actually using it.