findobj does not work
9 次查看(过去 30 天)
显示 更早的评论
When the gui main program is running, I use findobj('Name', 'Gui_Main_Program');
This command does not work in timer callback function. It neither work in Matlab command window.
I see everyone says do not use global variables, so I put data in gui_main_hObject.UserData.
Thank you.
2 个评论
Star Strider
2020-3-4
The first argument to findobj must the the handle to the object you want to use it with.
Walter Roberson
2020-3-4
No, https://www.mathworks.com/help/matlab/ref/findobj.html shows multiple syntaxes in which there is no object passed
采纳的回答
Walter Roberson
2020-3-4
Either there is no object with exactly that name, or else the handle of it is not visible.
What shows up for
get(findall('type', 'figure'), 'Name')
3 个评论
Walter Roberson
2020-3-4
get(findall(0, 'type', 'figure'), 'Name')
I keep forgetting that findall requires a first parameter
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!