数学建模社区-数学中国

标题: 【奠基经典】MATLAB实用程序案例之多选菜单 [打印本页]

作者: 青年梦想家    时间: 2015-7-27 23:02
标题: 【奠基经典】MATLAB实用程序案例之多选菜单






多选菜单
实例:

h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','实例38');
[x,y]=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',[20 20 80 100],...

'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']);



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






欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5