I have inadvertently messed around with my matlabroot
folder and now some functionality is broken. How do I reset the state of the folder so that everything works again?
While trying to solve this question, I added a new method (nansubset.m
) to the @table
folder ([matlabroot,'\toolbox\matlab\datatypes\@table\*']
). That did not work so I deleted it and moved it to my Matlab path as suggested by @TroyHaskin's answer. Everything worked fine until I restarted Matlab. Now I am getting the error message:
Error using table/nansubset
Previously accessible file "C:\Program
Files\MATLAB\R2015b\toolbox\matlab\datatypes\@table\nansubset.m" is now inaccessible.
I have tried clear classes
and clear java
and restarting Matlab, to no avail.
EDIT:
I also found this link on the Mathworks site, which led me to doc toolbox_path_cache
that in turn suggests using rehash toolboxcache
. I did this and now there is a new error message:
Error using table/nansubset
Method 'nansubset' is not defined for class 'table' or is removed from MATLAB's search path.
However, which nansubset
returns the right file from a directory on my Matlab path.