function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc
c=str2num(get(handles.edit1,'string'))
if c>0 && c
end
if c>pi && c<2*pi
set(handles.text1,'string','NO')
end
if c<0 || c>2*pi
set(handles.text1,'string','Error')
end
GUI可以绘制曲线,首先要放一个坐标轴axes上去。
然后利用下面的语句画图:
axes(handles.axes1);cla;
plot(x,y)
希望能解决您的问题,望采纳!