原创
matlab学习笔记(4)——图形界面(GUI)
1、命令行中输入 guide,选择 Blank GUI
1.1 显示组件的名字
1.2 对齐组件
1.3 function test1_OpeningFcn(hObject, eventdata, handles, varargin)
function test1_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to test1 (see VARARGIN)
handles.peaks=peaks(35);
handles.membrane=membrane;
[x,y]=meshgrid(-8:.5:8);
r=sqrt(x.^2+y.^2)+eps;
sinc=sin(r)./r;
handles.sinc=sinc;
handles.current_data=handles.peaks;
surf(handles.current_data);
2、handles-- Parents of the GUI Objects
2.1 set the axes for plotting
3、set 和 get
4、用 handles 存储变量
5、将 Matlab GUI 打包为 exe
deploytool
curton 2019-5-3 12:08