h0=figure('toolbar','none','position',[198 56 500 450],'name','IIR滤波程序');
h1=axes('parent',h0,'position',[0.15 0.45 0.7 0.5]);
N=10;
wn=[100 200]/500;
wn1=100/200;
k1=uicontrol('parent',h0,'style','radiobutton','string','daizu','position',[200 150 80 20],...
'callback',...
['set(k1,''value'',1);,',...
'set(k2,''value'',0);,',...
'set(k3,''value'',0);,',...
'set(k4,''value'',0);,',...
'[b,a]=butter(N,wn,''stop'');,',...
'freqz(b,a);']);
k2=uicontrol('parent',h0,'style','radiobutton','string','daitong','position',[200 120 80 20],...
'callback',...
['set(k2,''value'',1);,',...
'set(k1,''value'',0);,',...
'set(k3,''value'',0);,',...
'set(k4,''value'',0);,',...
'[b,a]=butter(N,wn,''bandpass'');,',...
'freqz(b,a);']);
k3=uicontrol('parent',h0,'style','radiobutton','string','ditong','position',[200 90 80 20],...
'callback',...
['set(k3,''value'',1);,',...
'set(k1,''value'',0);,',...
'set(k2,''value'',0);,',...
'set(k4,''value'',0);,',...
'[b,a]=butter(N,wn1,''low'');,',...
'freqz(b,a);']);
k4=uicontrol('parent',h0,'style','radiobutton','string','gaotong','position',[200 60 80 20],...
'callback',...
['set(k4,''value'',1);,',...
'set(k1,''value'',0);,',...
'set(k2,''value'',0);,',...
'set(k3,''value'',0);,',...
'[b,a]=butter(N,wn1,''high'');,',...
'freqz(b,a);']);
编了一个,但是不知道为什么选完一次作图,再选择另一次时弹出的图形会把四个单选钮也覆盖掉?就是单选钮不见了的感觉。
请高手帮忙看一下,谢谢!!