
如何用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到底怎么写啊?它的格式是什么样的?和普通的语句有什么大的差别吗?
我该如何实现这个
请高手为我解答,谢谢了! 展开
展开全部
把画图命令放到回调函数下 也就是callback里面

2024-08-07 广告
作为东莞市大凡光学科技有限公司的一员,我们深知Matlab圆点标定板在相机标定中的重要性。该标定板通过均匀分布的圆点,帮助精确计算相机参数,优化成像效果。Matlab强大的编程功能,使得我们能够灵活设计标定板,调整圆点大小、数量和分布,以满...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |