Every now and then, variables just stop showing up in the Workspace pane. who
and whos
show that there are definitely variables in the workspace - I just can't see them in the Workspace pane. Only restarting MATLAB resolves this. Why is this happening?
Command Window — To view the value of a variable in the Command Window, type the variable name. For the example, to see the value of a variable n , type n and press Enter. The Command Window displays the variable name and its value. To view all the variables in the current workspace, call the who function.
Explanation: By right clicking on the Workspace header, we will get to know the characteristics of the variables which are stored in the Workspace and what it can display. The time of variable generation is not present in the Workspace.
One of the most common causes is misspelling the function or variable name. Especially with longer names or names containing similar characters (such as the letter l and numeral one), it is easy to make mistakes and hard to detect them.
The workspace contains variables that you create or import into MATLAB from data files or other programs. You can view and edit the contents of the workspace in the Workspace browser or in the Command Window. For more information, see Create and Edit Variables. Workspace variables do not persist after you exit MATLAB.
I filed a bug report and never heard a word... I upgraded to 2011a, and haven't had this problem since. Because of this, because no one provided an answer and because I can no longer investigate others' further suggestions, I am accepting this as my answer.
Do you invoke the Debugger and return to the workspace afterwards without closing it? Notice the changed command promt, as it starts with K>> now. The invocation causes a context switch and your variables dissapear (until you stop the debugger)...
But that's just a guess. I was confused about this a couple of times myself during my starting time with MATLAB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With