Documentation of iduiinsd


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

axh=iduiinsd(data,data_info,data_n,active,axinfo)

Help text

IDUIINSD Inserts data into the Data Summary Board.
   DATA: The data.
   DATA_INFO: The associated information matrix.
   DATA_N: The name of the data set.
   ACTIVE: 1 to make icon selected at insert
   AXINFO: [Board_no,position,color]
   AXH: the handle number of the data's icon axis.

Cross-Reference Information

This function calls This function is called by

Listing of function iduiinsd

function axh=iduiinsd(data,data_info,data_n,active,axinfo)

%   L. Ljung 4-4-94
%   Copyright (c) 1986-98 by The MathWorks, Inc.
%   $Revision: 3.4 $  $Date: 1997/12/02 03:41:45 $


global XIDplotw XIDhw XIDcounters XIDsbmen
if nargin<4,active=1;end
[ny,nu]=iduiiono('old',data_info,'dat');
[nrow,ncol]=size(data);
if nrow<ncol
   errordlg(str2mat('You have more input-output channels',...
            'than data observations. This is not allowed.'));
  return
end
XIDcounters(5)=1;
if XIDcounters(3)<nu|XIDcounters(4)<ny
   XIDcounters([3 4])=max(XIDcounters([3 4]),[nu ny]);
   iduiiono('set',XIDcounters([3 4]));
end
if nargin<5
  [axh,texh,linh]=idnextw('data');
else
  [axh,texh,linh]=idnextw('data',axinfo(1),axinfo(2:5),axinfo(6:8));
  if isempty(linh),  [axh,texh,linh]=idnextw('data');end
end
tagdat=get(axh,'tag');
datanr=eval(tagdat(6:length(tagdat)));
set(linh,'UserData',data,'tag','dataline');
set(texh,'UserData',data_info,'string',data_n);
dl=min(50,nrow);
ll=data(1:dl,1);
   set(linh,'xdata',1:dl,'ydata',ll);
   if active, set(linh,'linewidth',3);end
   ylim = [2*min(ll)-max(ll) max(ll)];
   if ylim(1)==ylim(2),
      ylim = [ylim(1)-1 ylim(2)+1];
   end
   Plotcolors=idlayout('plotcol');
   axescolor=Plotcolors(4,:);
   set(axh,'ylim',ylim,'xlim',[0 dl],'color',axescolor);
   set([linh axh texh],'vis','on')
usde=get(XIDhw(3,1),'userdata'); % If working data is empty we fill it
if isempty(usde)&active
    idinseva(axh,'seles');idinseva(axh,'selva');
end
set(XIDplotw([1,13],2),'enable','on')
if active,
   if  get(XIDplotw(1,2),'value'),wnr=1;else wnr=[];end
   if  get(XIDplotw(13,2),'value'),wnr=[wnr 13];end

   if ~isempty(wnr),iduimod(wnr,datanr,[]);end
   set(XIDsbmen([3 5]),'enable','on')
   if strcmp(get(XIDsbmen(1),'tag'),'open')
      [label,acc]=menulabel('&Merge session... ^o');
      set(XIDsbmen(1),'label',label,'tag','merge');
   end
   iduistat(['Data set ',data_n,' inserted.',...
         '  Double click on icon (right mouse) for text information.'])
end