MATLAB-GUI创建 (2)

image

如果,不对其进行限制,图像会显示在第二个axes上

image

我们修改代码 让它显示在第一个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)

image

或者用另一种代码

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)

image

这样就实现了MATLAB GUI的创建

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzxggp.html