Hovering mouse over a variable suddenly doesn't show present value in R2015b?

조회 수: 20 (최근 30일)
Ever since I installed MATLAB on my computer this feature was working, then recently it does not. I saw someone else had an issue but it was solved by re-enabling the feature in preferences.
Any reason why (a) this feature was always working in my R2015b, and is now not saving to be always on when I open matlab.
And, (b) why when this feature is enabled, it does not work in my local functions, and only in my main?
I'm getting frustrated since it greatly speeds up my debugging!
Thanks!
  댓글 수: 1
Adam
Adam 2017년 3월 13일
Is this the case for all variables in all cases or some specific circumstance? e.g. a variable that is both the input and the output of a function will not be visible from the calling function while the function that operates on it is active.

댓글을 달려면 로그인하십시오.

답변 (2개)

prasanth s
prasanth s 2019년 3월 2일
편집: prasanth s 2019년 3월 2일
I got this issue in matlab 2018a. I found that one of my variable name is 'eval'. 'eval' is an inbuild function name, so i changed the variable name. now it fixed.
  댓글 수: 3
Mohammed Algoblan
Mohammed Algoblan 2020년 10월 19일
Same problem here, though I didn't have any variable called "eval". so I looked for any potential variable that could be an inbuild function name and I found a one called "exist" so I changed its name and it worked just fine.
James Van Zandt
James Van Zandt 2021년 8월 17일
Thanks! I was calling eig, which returns eigenvectors and eigenvalues. For the latter, I'd picked the name "eval". I'm disappointed that the collision broke the debugger.

댓글을 달려면 로그인하십시오.


Brandon Eidson
Brandon Eidson 2017년 3월 16일
Hey Cynthia, I believe the feature to which you are referring is the ability to view variable values in a data tip window while your execution is paused in debug mode. If so, this feature should be enabled by default. The documentation linked to below describes how to use this feature.
I am a little unclear on how the "Enable datatips in edit mode" preference affects this feature. I will submit a request that his documentation be enhanced.
That documentation also mentions some cases when the feature will not work--such as when MATLAB is in the process of overwriting a variable. However, if you believe you are not able to use the feature when you should, I would encourage you to uninstall and reinstall MATLAB. If you are still experiencing the issue, please contact MathWorks Technical Support.
If I understand your second question correctly, I believe the reason is that the MATLAB data tip can only display the values of the variables in the current workspace. I think this is what Adam was getting at. If your debugger is paused in your "main" script, it will not be able to display variable values in function workspaces. You can read more about this distinction in the documentation linked to below.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by