This script allow to make a personal pathdef when more users use same Matlab in a server distribution or multi access PC.
The file pathdef.m is saved into preference directory created by Matlab for each user, and after first lunch is used to save added path from specified user.
Usage: Copy the attached file startup.m into Matlabdir\toolbox\local\
Claudio Gambelli (2021). Personal pathdef for multi-user Matlab Access (https://www.mathworks.com/matlabcentral/fileexchange/13653-personal-pathdef-for-multi-user-matlab-access), MATLAB Central File Exchange. Retrieved .
Implementing this with R2017b. Appears to be working fine. Thanks, Claudio!
Thank you Jonathan for the solution!
Works great for me, thanks!
I think that the solution to Michael's problem is in line 6 of startup.m
if exist([persdir '\pathdef'],'file')
must be changed to
if exist([persdir '/pathdef'],'file')
for macs. Note the direction of the slash.
Also, for MATLAB R2010B running on mac OSX, I found that I had to go to my MATLAB install, do 'Show Package Contents', and under toolbox/local/ edit the pathdef.m file appropriately. The paths in that file seem to be added to all users automatically.
Thank you for the comment, excuse me, i have read only today.
I have not try under R200B, only to R2008A, and there is not the problem.
The copyfile is executed only at the first lunch, now it's run correctly?.
I get this message under R2008b
Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup,
which should be resolved as soon as possible. Error detected was:
Can not copy or move a file or directory onto itself.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!