Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
For example: when I turn on the radio button I have 1, when I turn off the radio button I have 0

回答(1 个)

Image Analyst
Image Analyst 2016-8-1
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 个评论
Stephen23
Stephen23 2016-8-1
@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 2016-8-1
编辑:Stephen23 2016-8-1
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

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by