How verify that a RadioButton is Checked?

3 次查看(过去 30 天)
Hi, this is my first post, i'm learnin' to use Matlab, and in particular to programming the Gui. My question is: How can i make a control on a radiobutton in order to verify that it is checked? Something like
if(radioButton1.isChecked())... else..
thank you!:)

采纳的回答

Jiro Doke
Jiro Doke 2011-2-12
Use uicontrol (with style 'radiobutton') to create a radio button.
h = uicontrol('Style', 'radiobutton');
Then check the "Value" property to see if it is checked or not.
v = get(h, 'Value')

更多回答(1 个)

Giuseppe migliarese
Really Thank you!
  1 个评论
Jan
Jan 2011-2-14
Thanking is very polite. Accepting the answer is helpful for others in addition.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by