How can I add a Matlab search path for all users on a Linux system?
I am managing a Linux computer that is shared by several people. I want to place some Matlab *.m files at a path (for example, /usr/local/matlab/our_matlab_scripts/) which everyone has a read access permission. I also want to add this path to the Matlab search paths of all users so that they can start using the Matlab files immediately.
As a single user, I learned that I can add a search path by Matlab 'addpath' command or from the file menu of Matlab, for example. However, so far I could not find a way to do it as an administrator for all the current and future users at once.
I would be grateful if you could kindly teach me.
startup.m. If you put that into $matlabroot/toolbox/local of the Matlab installation, the settings are done for all users. This option is much preferable over editingmatlabrc.m, both for setting up a new install and for maintenance. - Jonasstartup.mthan to editmatlabrc.m. Is there a convention that a new version of Matlab is shipped withoutstartup.m? If so, does it mean that an administrator can basically just copy$matlabroot/toolbox/local/startup.mof old installation to$matlabroot/toolbox/local/of new installation (and edit it for minor modification)? Or, did you imply other reasons? - noriostartup.m. Thus, on a new install, you simply copy the file from the old installation to the new (I actually copy two files,startup.mand a file it depends on). Also, since all user modifications are in a separate file, it is much easier to maintain, since you don't have to hunt through many, many lines of code inmatlabrc.mto figure out where possibly someone might have changed something (at the beginning, at the end, somewhere in between)? - Jonas