The first sentence on the help screen for restoredefaultpath is
%RESTOREDEFAULTPATH Restores the MATLAB search path to installed products.
% RESTOREDEFAULTPATH sets the search path to include only folders for
% installed products from MathWorks. Use RESTOREDEFAULTPATH when you are
% having problems with the search path.
which is precisely what restoredefaultpath doesn't do. (In the good old days it did, but not any more.)
In fact, restoredefault calls $MATLAB/toolbox/local/userpath.m which prepends a user specific path to the path.
I presume this must be what MATHWORKS intended? Can't be a bug, since it's hardcoded into restoredefaultpath.m If so, (a) could mathworks please change the description of restoredefaultpath? (b) why? (c) is there a command that actually restores the default path? (d) if not, could future releases please add a flag to restoredefaultpath so that one can actually restore the default path?
Thanks, Leo
Best Answer