Global Index (short | long) | Local contents | Local Index (short | long)
iduipop(arg)
IDUIPOP Manages the callbacks from ident's pop-up menus.
This function calls | This function is called by |
---|---|
function iduipop(arg) % L. Ljung 9-27-94 % Copyright (c) 1986-98 by The MathWorks, Inc. % $Revision: 3.5 $ $Date: 1997/12/02 03:41:30 $ global XIDplotw XIDhw XIDhload curo=iduigco; popv=get(curo,'value'); if strcmp(arg,'data') if popv==1,iduistat(''); elseif popv==2, eval('iduifile(''load_iodata'');') elseif popv==3, eval('iduifile(''load_iodata'');') u2 = []; y2 = []; load dryer2 set(XIDhload(1,8),'string','0'); set(XIDhload(1,6),'string','0.08'); set(XIDhload(1,4),'string','Dryer'); set(XIDhload(1,11),'string','u2','userdata',u2); set(XIDhload(1,13),'string','y2','userdata',y2); info=str2mat('% This is the ''Hair Dryer'' data set. The',... '% input is the electric power and the',... '% output is the outlet air temperature.','',' load dryer2'); set(XIDhload(1,12),'string',info); iduistat('Press the Import button.') end elseif strcmp(arg,'model') if popv==1,iduistat(''); elseif popv==2, eval('iduifile(''load_model'');'),end elseif strcmp(arg,'preprocess') if popv==1,iduistat('');return,end usd=get(XIDhw(3,1),'userdata'); if isempty(usd) errordlg('You must first import a data set.'); set(curo,'Value',1) return end if popv==2, eval('iduisel(''open_io'');') elseif popv==3, eval('iduisel(''open_portions'');') elseif popv==4, eval('iduisel(''dtrend'',0);') elseif popv==5, eval('iduisel(''dtrend'',1);') elseif popv==6, eval('iduifilt(''open'');') elseif popv==7, eval('iduisel(''open_dec'');') elseif popv==8 set(XIDplotw(1,2),'value',1),iduipw(1); eval('hax=iduisel(''dtrend'',0,0);') hnrdat=findobj(hax,'tag','dataline'); hnrstr=findobj(hax,'tag','name'); data=get(hnrdat,'UserData'); data_info=get(hnrstr,'UserData'); data_n=get(hnrstr,'String'); [ny,nu]=iduiiono('old',data_info,'dat'); nuseq=eval(['[',data_info(7,:),']']); nyseq=eval(['[',data_info(6,:),']']); if isempty(nuseq),nu1=[];else nu1=nuseq(1);end ny1=nyseq(1); chan_flag=0; if nu>0 if nu1>1|ny1>1,chan_flag=1;end else if ny1>1,chan_flag=1;end end if chan_flag,iduiiono('update',ny1,nu1,1,1);end % To select % existing channel [nl,nr]=size(data); nlh=ceil(nl/2); name=[data_n,'e']; namv=[data_n,'v']; eval(['haxe=iduisel(''insert'',data,data_info,data_n,'... '[1,nlh],name);']) eval(['haxv=iduisel(''insert'',data,data_info,data_n,'... '[nlh+1,nl],namv);']) eval('idinseva(haxe,''seles'');') eval('idinseva(haxv,''selva'');') iduistat([data_n,': Detrended data. ',name,': First half. '... ,namv,': Second half.']); end elseif strcmp(arg,'estimate') if popv==1,iduistat('');return,end usd=get(XIDhw(3,1),'userdata'); if isempty(usd) errordlg('You must first import a data set.'); set(curo,'Value',1); return end if popv==4, eval('iduicra(''open'');') elseif popv==3, eval('iduispa(''open'');') elseif popv==2, eval('idparest(''open'');') elseif popv==5, eval('iduiqs;') end end set(curo,'value',1);