如果,不对其进行限制,图像会显示在第二个axes上
我们修改代码 让它显示在第一个axes上
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.axes1,handles.current_data)或者用另一种代码
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; axes(handles.axes2) surf(handles.current_data)这样就实现了MATLAB GUI的创建