uipanel回调函数

时间:2013-11-15 15:03:28

标签: matlab

我想在单击单选按钮时绘制轴。 uipanel没有回调函数。我可以通过get(eventdata.NewValue,'Tag');按钮从收音机中取值。

1 个答案:

答案 0 :(得分:1)

...但是单选按钮有一个回调:

使用GUIDE时,您会得到:

% --- Executes on button press in radiobutton1.
function radiobutton1_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton1

不使用GUIDE:

只需设置回调 - >

set(handleOfRadioButton,'Callback',@myCallbackFunction)