How verify that a RadioButton is Checked?

조회 수: 4 (최근 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 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