Variable access error in Matlab
3 次查看(过去 30 天)
显示 更早的评论
Hi there,
I never used to have this error message, when i tried to access varible workspace. Since start of this year, i am having the following error, while i "double click and open" (access) variables from workspace.
Does any one have a solution? I am running scripts in 2016b.
![error_msg_matlab.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/200293/error_msg_matlab.png)
6 个评论
Walter Roberson
2020-2-8
What shows up for
which -all workspacefunc
The code I am looking at would give that error if you tried to openvar() a variable name that was an expression instead of a plain variable name.
Suzan Doornwaard
2020-2-9
Hi Walter,
Thanks for the reply. Your suggestion lead to a discovery and eventually I got rid of the issue.
This is what I did:
1) I ran the command you suggested
which -all workspacefunc
and that gave the exact same error I posted above.
2) I re-open my Matlab and I received all sorts of error regarding that has the same name with Matlab's own functions (assert, scalar) and it points out the add-on I am using in the toolbox directory of mine.
3) Funny enough, I deleted the folder but I realized I didn't remove the path to those in Matlab's path. I thought I would receive an error that would say something like "The toolbox you have in path doesn't exist anymore" for such situations but apparently not.
4) Then i simply removed those particular toolbox related paths from the Path. I restarted my Matlab and I didn't have any errors.
5) I ran the functions that I received error and I double clicked the variables this time. No error. So I realize it's simply clashing functions but for some reason the error is not specific enough to point that out or I am not experienced enough with Matlab yet. At least that's what I experienced.
I hope that helps others with the same problem.
回答(1 个)
magie
2019-11-29
编辑:magie
2019-11-29
I have the same problem and it appeared out of the blue.
Whenever I double-click on workspace variables or sometimes even when I place the cursor into the command window or in the editor. Sometimes the error message appears when I open Matlab.
I have version 2019b. I work with it for about 2 months now - no problems until yesterday. I never experienced this error and I have been working with version 2014a for a while now.
I didn't change my codes, I do not have any shadow functions. I tried restoring default path, I even re-installed Matlab after fully de-installing the old version.
Nothing helped so far.
If you have any suggestions, thanks in advance.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!