Created
November 14, 2011 23:44
-
-
Save nwh/1365603 to your computer and use it in GitHub Desktop.
An alternate matlab path command that does not display toolboxes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%mypath this is matlab's path without toolboxes | |
function mypath | |
C = textscan(path,'%s','Delimiter',pathsep); | |
C = C{1}; | |
mr = matlabroot; | |
mrlen = length(mr); | |
function printer(x) | |
if length(x) < mrlen || ~strcmp(mr,x(1:mrlen)) | |
fprintf('%s\n',x); | |
end | |
end | |
cellfun(@printer,C); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment