clf reset % <1><br>set(gcf,'unit','normalized','position',[0.1,0.4,0.85,0.35]);%<br>set(gcf,'defaultuicontrolunits','normalized');<br>set(gcf,'defaultuicontrolfontsize',11);<br>set(gcf,'defaultuicontrolfontname','隶书');<br>set(gcf,'defaultuicontrolhorizontal','left');<br> %<br>str='Data reconciliation';<br>set(gcf,'name',str,'numbertitle','off'); <br>hpop=uicontrol(gcf,'style','popup',... % <17><br> 'position',[0.8,0.73,0.18,0.12],...<br> 'string','图1|图2');% <br>set(hpop,'callback','Mycolormap(hpop)'); %<27><br>[Mycolormap.m]<br>function Mycolormap(hpop)<br>global hpop<br>popstr={'图1','图2'}; %弹出框色图矩阵<br>vpop=get(findobj(gcf,'Tag','PopupMenu1'),'value'); %获得选项的位置标识<br>h1(eval(popstr{vpop})) %采用弹出框所选色图<br>function h1(vpop)<br>switch vpop<br> case '图1',set(hpop,'callback','tu1');<br> otherwise '图2', set(hpop,'callback','tu2');<br>end<br><br>Function 'eval' is not defined for values of class 'double'.<br>Error while evaluating uicontrol Callback.<br>怎么改呀?
[此贴子已经被作者于2006-5-18 11:58:05编辑过]
|