Control of Pathdef Output Hierarchy
Show older comments
I am trying to control the hierarchy of a pathdef.m file. I want matlab scripts located on a network drive (P:) to be above the default Matlab toolbox locations (C:). To me it seems like the output of the pathdef is alphabetical. Is there a way to control output of pathdef list? I want to organize pathdef hierarchy.
Answers (2)
Fangjun Jiang
on 17 Aug 2011
0 votes
You can run pathtool to move up/down the folder manually.
If you want to make sure certain folders are always at the top of the path, I suggest you use addpath(). You can place this addpath() command in your startup.m file.
Jan
on 17 Aug 2011
0 votes
No, the output of PATHDEF is not alphabetical. It equals the order the folders are inserted to the path. E.g. a folder added by "addpath(FolderName, '-end')" remains at the end. This is a very essential behaviour.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!