mypath.m
by Malcolm Wood
16 Mar 2006
(Updated 23 Feb 2010)
Displays or returns the MATLAB path, omitting directories which are inside the MATLAB "toolbox" ...
|
Watch this File
|
| File Information |
| Description |
Those of us who have a lot of The MathWorks' toolboxes find that every time we type "path" at the MATLAB command line, we have to scroll up several pages before we find what we're looking for.
Since most of the time we're interested in our own working directories, and since most of us don't do our work in directories under $matlabroot/toolbox, this function prints the (hopefully much shorter) list of directories which are on the MATLAB path but aren't inside $matlabroot/toolbox.
Just type:
>> mypath
to see those directories.
Alternatively, if you want to do something with the result, type:
>> p = mypath
to get the same list as a cell array of strings. |
| Acknowledgements |
This submission has inspired the following:
exportToZip: Identifies the dependencies of an M-file and creates a ZIP file, exporttozip
|
| MATLAB release |
MATLAB 6.1 (R12.1)
|
| Other requirements |
Should work in any version of MATLAB and any platform, though I have only tested on Windows and back as far as R12.1 |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (4) |
| 20 Mar 2006 |
John D'Errico
|
|
|
| 22 Mar 2006 |
Malcolm Wood
|
|
|
| 26 Mar 2006 |
John D'Errico
|
|
|
| 11 Mar 2011 |
Mark Morehead
|
|
|
| Updates |
| 21 Mar 2006 |
Response to suggestion. Now uses pathsep instead of hardcoded semi-colon. |
| 17 Dec 2009 |
Review |
| 23 Feb 2010 |
Added copyright line. |
|
Contact us at files@mathworks.com