Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
Antonino Alesci
Antonino Alesci am 1 Aug. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
For example: when I turn on the radio button I have 1, when I turn off the radio button I have 0

Antworten (1)

Image Analyst
Image Analyst am 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 Kommentare
Stephen23
Stephen23 am 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 am 1 Aug. 2016
Bearbeitet: Stephen23 am 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

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by