Documentation of idsimss


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


Function Synopsis

y=idsimss(ze,eta)

Help text

IDSIMSS  simulates a given system

   Y = idsimss(Z,ETA)

   Auxiliary function to idsim

Cross-Reference Information

This function calls This function is called by

Listing of function idsimss

function y=idsimss(ze,eta)

%   L. Ljung 10-2-90
%   Copyright (c) 1986-98 by The MathWorks, Inc.
%   $Revision: 2.3 $  $Date: 1997/12/02 03:40:49 $

[nr,nc]=size(eta);
nd=eta(1,5);
sspmod=getmfth(eta);

[etapar,P,lambda]=th2par(eta);
arg=getargth(eta);
T=eta(1,2);
if any(eta(2,8)==[2 3]),Tmod=-1;else Tmod=abs(T);end
if length(etapar)==0,etapar=0;end
[a,b,c,d,k,x0]=feval(sspmod,etapar,Tmod,arg);
if max(abs(eig(a)))>1, disp('WARNING: System unstable.'),end
[ny,n]=size(c);[n,nu]=size(b);
[Ncap,nze]=size(ze);
if ~any(nze==[nu nu+ny])
   error('An incorrect number of inputs/noises have been specified!')
end
if nze==ny+nu,
   sqrlam=sqrtm(lambda);
   e=ze(:,nu+1:nu+ny)*sqrlam;
   x=ltitr(a,[b k],[ze(:,1:nu) e],x0);y=(c*x' +[d,eye(ny)]*[ze(:,1:nu) e]')';
end
if nze==nu
   x=ltitr(a,b,ze,x0);y=(c*x'+d*ze')';
end