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

1 次查看(过去 30 天)
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

回答(2 个)

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

Daniel Shub
Daniel Shub 2011-12-14

类别

Help CenterFile Exchange 中查找有关 Search Path 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by