Workspace Updates when script is complete?
10 次查看(过去 30 天)
显示 更早的评论
Does the Workspace only update when the script is completed running? I have this very simply program to test. If I manually clear the workspace at the command line and then run this script, the workspace doesn't list the variables x and y until the entire script is complete.
x = 3
pause(2)
y = 4
pause(2)
Similarly, if I manually (via command line) populate some variables in the workspace and then run the following, again the workspace isn't cleared until script is complete.
clear
pause(2)
The pauses are used to visually confirm when the workspace is updated, which in both cases is when the command prompt returns. I am using the most recent trial version.
0 个评论
采纳的回答
Walter Roberson
2022-1-15
Correct.
Generally speaking, there would be too much overhead to continually update the workspace browser when you are not stopped.
4 个评论
Steven Lord
2022-1-16
You could use the debugging tools included in MATLAB to monitor the progress of your code and pause execution to examine the values of variables during troubleshooting.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!