如何用matlab中gui画图
我想设计一个GUI,点击按钮后就能画出相应的图像来,但是我不知道怎么给按钮添加这些功能。functionpushbutton1_Callback(hObject,even...
我想设计一个GUI,点击按钮后就能画出相应的图像来,但是我不知道怎么给按钮添加这些功能。
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)
% --- If Enable == 'on', executes on mouse press in 5 pixel border.% --- Otherwise, executes on mouse press in 5 pixel border or over pushbutton1.function pushbutton1_ButtonDownFcn(hObject, eventdata, handles)
x=0:0.1:2*piy=sin(x)plot(x,y)
% 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)
callback到底怎么写啊?它的格式是什么样的?和普通的语句有什么大的差别吗?
我该如何实现这个
请高手为我解答,谢谢了! 展开
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)
% --- If Enable == 'on', executes on mouse press in 5 pixel border.% --- Otherwise, executes on mouse press in 5 pixel border or over pushbutton1.function pushbutton1_ButtonDownFcn(hObject, eventdata, handles)
x=0:0.1:2*piy=sin(x)plot(x,y)
% 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)
callback到底怎么写啊?它的格式是什么样的?和普通的语句有什么大的差别吗?
我该如何实现这个
请高手为我解答,谢谢了! 展开
2个回答
上海华然企业咨询
2024-10-21 广告
2024-10-21 广告
上海华然企业咨询有限公司专注于AI与数据合规咨询服务。我们的核心团队来自头部互联网企业、红圈律所和专业安全服务机构。凭借深刻的AI产品理解、上百个AI产品的合规咨询和算法备案经验,为客户提供专业的算法备案、AI安全评估、数据出境等合规服务,...
点击进入详情页
本回答由上海华然企业咨询提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |