Skip to content

Instantly share code, notes, and snippets.

@nwh
Created November 14, 2011 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwh/1365603 to your computer and use it in GitHub Desktop.
Save nwh/1365603 to your computer and use it in GitHub Desktop.
An alternate matlab path command that does not display toolboxes
%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