File Exchange

image thumbnail

Personal pathdef for multi-user Matlab Access

version (1.25 KB) by Claudio Gambelli
Simple script for multi-user Matlab

1 Download

Updated 15 Jan 2007

View License

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\

Cite As

Claudio Gambelli (2021). Personal pathdef for multi-user Matlab Access (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)




Kevin Severud

Implementing this with R2017b. Appears to be working fine. Thanks, Claudio!

Claudio Gambelli

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.

Claudio Gambelli

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?.
Thank you


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.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!