MATLABPATH environment variable not found in R2011a on Mac OS X Lion

1 view (last 30 days)
We are running Matlab on Mac computers, where user home directories are hosted on a central server. Recently, we've been having some trouble with our main server, prompting us to temporarily move the user home directories to another machine. This creates trouble for the users' matlab paths, as Matlab does not seem to be able to refer to $HOME, but always resolves the home directory to the machine-specific path (/Network/Servers/<fileserver>/Users/<user> ). As a work-around for this, we attempted to make us of environment variables, thinking that Matlab should (as the documentation suggests) pick up any paths contained in the MATLABPATH environment variable. However, setting this variable through launchctl, i.e. launchctl setenv MATLABPATH path1:path2:..., did not register with Matlab. We confirmed through launchctl getenv MATLABPATH that the variable was indeed set. Is this variable not read on Mac OS X, or is there something else we could have missed that prevents this solution from working? Alternatively, is there a better solution for getting around the fact that Matlab does resolve the $HOME variable? Thanks in advance for any suggestions!
~ Roger

Answers (2)

Malcolm Lidierth
Malcolm Lidierth on 14 Dec 2011
Could
java.lang.System.setProperty('user.home',...
at the ML prompt help?

Daniel Shub
Daniel Shub on 14 Dec 2011

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!