Real Time Update of Workspace Variable Values while Running Code?
16 次查看(过去 30 天)
显示 更早的评论
Hello all,
Is it possible to update the values of the variables in the workspace while running a code? I have to track several counters and size of vectors, and it will be really useful to see those variables in the workspace instead of printing them into the command window.
Kind regards,
Daniel
0 个评论
回答(1 个)
Veda Upadhye
2017-9-6
编辑:per isakson
2020-5-14
Hi,
Unfortunately, you cannot use the variable editor to do that in MATLAB currently. Instead, you could use Live Editor and keep track of your variables in real time. Here is the documentation link for your reference:
I hope this helps!
-Veda
3 个评论
Steven
2019-12-24
The bad part of the live editor is it converts your m-file to a non text searchable file, I'm not a fan
Pierre
2025-11-26,15:39
Eight years later, no progress on this issue, as far as I can see.
At the age of massively multi-core CPU, it is somewhat depressing to see Matlab happily running at 100% on one core without being able to use any of the idle ones give the user a minimal feedback as to what is happening behind the scenes. If you're not debugging but simply running code and want to check the progress of the script, for instance. Yes I know you can have programmed some output for that, if you happen to have anticipated this need before pressing 'enter'. But in practice we don't always measure how fast (or rather how slow) the code will run, or why it could be bogged down, and it would be much more convenient to have a (pseudo-)real-time view.
Live Scripts are meant for a definitely different purpose (interactive computing) and do not answer the problem.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!