MATLAB: How verify that a RadioButton is Checked

gui

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!:)

Best Answer

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')