How verify that a RadioButton is Checked?

3 ビュー (過去 30 日間)
Giuseppe migliarese
Giuseppe migliarese 2011 年 2 月 12 日
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
Giuseppe migliarese 2011 年 2 月 14 日
Really Thank you!
  1 件のコメント
Jan
Jan 2011 年 2 月 14 日
Thanking is very polite. Accepting the answer is helpful for others in addition.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by