青年梦想家 发表于 2015-7-27 23:02

【奠基经典】MATLAB实用程序案例之多选菜单







多选菜单
实例:
h0=figure('toolbar','none',...'position',,...'name','实例38');=meshgrid(-8:0.5:8);
r=sqrt(x.^2+y.^2)+eps;
z=sin(r)./r;
h0=mesh(x,y,z);
hlist=uicontrol(gcf,'style','listbox',...
'string','default|spring|summer|autumn|winter',...
'max',5,...
'min',1,...
'position',,...
'callback',[...
'k=get(hlist,''value'');,',...
'switch k,',...
'case 1,',...
'colormap default,',...
'case 2,',...
'colormap spring,',...
'case 3,',...
'colormap summer,',...
'case 4,',...
'colormap autumn,',...
'case 5,',...
'colormap winter,',...
'end']);


关于本帖内容欢迎大家踊跃讨论,与在下交流!

页: [1]
查看完整版本: 【奠基经典】MATLAB实用程序案例之多选菜单