原帖由 liky83672815 于 2006-12-28 15:08 发表
呵呵不好意思我才知道怎么上传文件了,eight大人麻烦你看看了呵呵很短的程序希望不会耽误你太多时间的谢谢了
不知道是否你要的效果:
h=figure(...
'name','one',...
'numbertitle','off',...
'menubar','none',...
'toolbar','none');
x=0:0.1:2*pi;
hpop=uicontrol(h,...
'style','popup',...
'unit','normalized',...
'position',[0.035,0.87,0.12,0.12],...
'string','无|sin(x)|cos(x)|tan(x)',...
'callback',[...
'if ishandle(hAxes),delete(hAxes),end,',...
'hAxes = axes(''Parent'',h,''Position'',[0.1,0.1,0.5,0.5]);',...
'switch get(hpop,''value''),',...
'case 1,',...
'case 2,',...
'h2=plot(x,sin(x),''Parent'',hAxes),',...
'case 3,',...
'h3=plot(x,cos(x),''Parent'',hAxes),',...
'case 4,',...
'h4=plot(x,tan(x),''Parent'',hAxes),',...
'end']); |