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

조회 수: 3(최근 30일)
Roger
Roger 2011년 12월 14일
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일

Community Treasure Hunt

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

Start Hunting!

Translated by