From: Vivian on
Hi,
I have the same problem and I would like to save the new paths in the original MATLAB pathdef.m. I am using window 7, MATLAB 2010a, and I have write access to the MATLAB directory where it is installed. I could open the pathdef.m file, edit it and save it using the editor, but I couldn't save the new paths using File->Set Path ->Save.
Any advices?

Thanks,
Vivian
From: kk KKsingh on
"Vivian " <vivian.cheung(a)csiro.au> wrote in message <i10q8d$4hd$1(a)fred.mathworks.com>...
> Hi,
> I have the same problem and I would like to save the new paths in the original MATLAB pathdef.m. I am using window 7, MATLAB 2010a, and I have write access to the MATLAB directory where it is installed. I could open the pathdef.m file, edit it and save it using the editor, but I couldn't save the new paths using File->Set Path ->Save.
> Any advices?
>
> Thanks,
> Vivian

1. It should work through File > setpath>add all subfolders > save

2. Other way save all the files in same folder, it will work

Thanks

Kumar
From: Jan Simon on
Dear Vivian,

> I could open the pathdef.m file, edit it and save it using the editor, but I couldn't save the new paths using File->Set Path ->Save.

If you can modify "pathdef.m" manually, it is really strange, that the Save button cannot save. Please describe exactly, what "I couldn't save" means - error message, file not touched??

Jan
From: Vivian on
The error message is:

MATLAB cannot save changes to the path.

The path file, pathdef.m, might be read-only or might be in a directory for which you do not have write access.

You can save pathdef.m to a different location. In order for MATLAB to use that pathdef.m in future sessions, you need to save it in your MATLAB startup directory (the direcotry from which you start MATLAB).

Would you like to save pathdef.m to another location?

When I clicked "yes" and tried to save it to my user MATLAB directory, this error message popped up again, without creating a pathdef.m file under my user MATLAB directory. I have also tried to copy and paste the pathdef.m from MATLAB root to my user directory, but when I clicked save after adding path with subfolders, it gave me the same error message again.
From: Image Analyst on
Would you want to just save the path as the default for all sessions? Why don't you just modify your startup.m file with lines like these:

if(~isdeployed)
addpath(genpath('C:\Program Files\MATLAB\Work'));
cd 'C:\Program Files\MATLAB\work'
savepath;
end

Note the use of savepath().