Info

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

I don't know what can I write to have a number when I push the radio button?

1 view (last 30 days)
For example: when I turn on the radio button I have 1, when I turn off the radio button I have 0

Answers (1)

Image Analyst
Image Analyst on 1 Aug 2016
How about
theValue = handles.radioButton1.Value;
Use that in any callback function you want. Of course replace radioButton1 with the actual "tag" name of your radio button.
  3 Comments
Stephen23
Stephen23 on 1 Aug 2016
@Antonino Alesci: are you going to tell us what the error message is, or do we have to use our magic crystal balls?
Please post all of the red text.
Antonino Alesci
Antonino Alesci on 1 Aug 2016
Edited: Stephen23 on 1 Aug 2016
The string isn't red. In the command window I read the following text:
Undefined function 'Callback' for input arguments of type 'char'.
Error in untitled>A1_Callback (line 81)
Callback 1 = handles.A1.Value;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in untitled (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)untitled('A1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback

This question is closed.

Community Treasure Hunt

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

Start Hunting!