matlab.internal.lang.capability.Capability error when opening data in the workspace
25 次查看(过去 30 天)
显示 更早的评论
Recently, when I double-click on any vector or array in the workspace to open it to view (these are small; this is not a memory issue regarding the display of vectors or arrays), I obtain the following error:
"Error: File: C:\ProgramFiles\MATLAB\R2021b\toolbox\matlab\codetools\openvar.m Line: 97 Column: 12 Unable to find or import 'matlab.internal.lang.capability.Capability'. Imported names must end with '.*' or be fully qualified."
I am using 2021b on a Windows10 machine. I've never had this arise before. Does somebody know why this is happening?
2 个评论
Walter Roberson
2022-9-16
Experiment with
restoredefaultpath; rehash toolboxcache
and test. If it cures the problem then you had something on your MATLAB path that is interfering.
采纳的回答
Walter Roberson
2022-9-17
If you have third-party toolboxes on your MATLAB path and they are earlier on the path than the built-in folders, then you can encounter random internal problems.
One third-party toolbox that often leads to this kind of problems is SPM12, which has a couple of "legacy" folders containing implementations of Mathworks functions for use in MATLAB releases before Mathworks introduced the functions. In most cases those "legacy" folders for SPM12 should be deleted.
The third party tool dfield also had a couple of problems along these lines.
The restoredefaultpath; rehash toolboxcache solution is not a permanent solution: it would remove all third-party tools from your path until the next time you restart MATLAB, unless you use savepath or pathtool . If you no longer use the third-party tools then remove them (at least from your path); if you still use them, then you could try moving the third-party tools to the end of the path ( pathtool is very useful for this purpose.) But sometimes you end up needing to go into the third-party tool and renaming some of its files and adjusting the code, as the third-party tools sometimes rely upon their incompatible functions.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Performance and Memory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!