radiobutton commands
4 次查看(过去 30 天)
显示 更早的评论
Hi: I have 2 radiobutton, and a pushbutton, which when pushed, i want it ti tell me which of the radiobuttons are selected. I am usiung
value1 = get(handles.(radiobutton1), 'value')
where radiobutton1 is the tag of one of my radiobuttons, but it is saying it does not know what radiobutton1 is. any ideas?
0 个评论
采纳的回答
Walter Roberson
2011-9-23
Try just
value1 = get(handles.radiobutton1, 'value')
If that doesn't work, and if you mean "tag" in the same sense it is used in handle graphics, then use
rb1h = findobj(0,'Tag','radiobutton1');
value1 = get(rb1h, 'value')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!