如何将@class文件夹重置为原始状态 [英] How to reset @class folder to native state
问题描述
我无意中弄乱了我的matlabroot
文件夹,现在某些功能坏了.如何重置文件夹的状态,以便一切都能正常工作?
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?
在尝试解决此问题,我向@table
文件夹([matlabroot,'\toolbox\matlab\datatypes\@table\*']
)添加了一个新方法(nansubset.m
).那没有用,所以我按照@TroyHaskin的回答建议将其删除,然后将其移至我的Matlab路径.一切正常,直到我重新启动Matlab.现在,我收到错误消息:
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.
我尝试了clear classes
和clear java
并重新启动Matlab,但无济于事.
I have tried clear classes
and clear java
and restarting Matlab, to no avail.
我还在Mathworks网站上找到了此链接,将我带到了rehash toolboxcache
.我这样做了,现在有一个新的错误消息:
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.
但是,which nansubset
从Matlab路径上的目录返回正确的文件.
However, which nansubset
returns the right file from a directory on my Matlab path.
推荐答案
我已经解决了我的问题.本质上,按照此处的说明,我们将转到toolbox_path_cache的"http://au.mathworks.com/help/matlab/matlab_env/toolbox-path-caching-in-the-matlab-program.html" rel ="nofollow">帮助文件,其中状态:
I have fixed my problem. Essentially, following the instructions from here, we are led to the helpfile for toolbox_path_cache
, which states:
某些人在matlabroot/toolbox文件夹中添加或删除文件时 其他方式,MATLAB可能无法识别这些更改.
When you add or remove files in matlabroot/toolbox folders by some other means, MATLAB might not recognize those changes.
...
更新缓存,以便MATLAB识别 您在matlabroot/toolbox文件夹中所做的更改.
Update the cache so MATLAB recognizes the changes you made in matlabroot/toolbox folders.
要更新缓存,请键入rehash toolbox
和rehash toolboxcache
.之后,有必要重新启动Matlab来解决问题
To update the cache, type rehash toolbox
and rehash toolboxcache
. After this, it was necessary to restart Matlab to fix the problem
这篇关于如何将@class文件夹重置为原始状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!