how can I print out all the variables of my code?
10 次查看(过去 30 天)
显示 更早的评论
Hello,
how can I print on my screen all my variables of my code? I'm trying to avoid to use twice the same variables and for that I need to make a list with all my variables. The problem is that I use some m-files which someone else wrote.
Kind regards
2 个评论
Iain
2013-11-22
If you're using someone else's m-files, why can't you turn them into functions?
If you turn them into functions, they cannot litter your workspace with random variables.
采纳的回答
Simon
2013-11-22
Hi!
Just look at your "Workspace", it can be found in the menu bar. Or type "who" in command window.
2 个评论
Simon
2013-11-22
If you modify a class you modify the functions of tha class. If you are working on a specific function you can set a breakpoint. The execution stops at that point leaving you in debug mode ("K" prompt in command window). Now you can execute "who" and see the variables in the function as defined up to this point.
更多回答(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!