Info

This question is closed. Reopen it to edit or answer.

In the group of buttons 1 to 9, what code should I use to print 0 if none of the buttons is selected, or if one is selected?

1 view (last 30 days)
In the group of buttons 1 to 9, what code should I use to print 0 if none of the buttons is selected, or if one is selected?
I want to use '' if else'' but when radio buttons become nonselected, value should show the zero value??

Answers (1)

Walter Roberson
Walter Roberson on 13 Feb 2019
if you are using a uibuttongroup then check isempty() the Selected property of the group.

This question is closed.

Community Treasure Hunt

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

Start Hunting!