From help-octave-request at bevo dot che dot wisc dot edu Thu Oct 16 12:32:03 2003 Subject: lsim vs. filter for simulation in Octave 2.1.50 From: "E. Joshua Rigler" To: Help-Octave Date: Thu, 16 Oct 2003 11:30:50 -0600 Please, don't hesitate to tell me *why* this is a dumb question... If I have numerator and denominator filter coefficients: A = [1.0 .33] B = [0.2 .10] lag = [0 1] ;; not necessary for anything ...or if I have a system derived from a state-space description with: A = -.33 B = .10 C = 1 D = 0.2 sys = ss2sys (A,B,C,D,1,0,1) ...shouldn't I get the same output from: 1) filter (B,A,[1;zeros(9,1)]) ...and... 2) lsim (sys,[1;zeros(9,1)],[1:10]) It seems that the feedthrough term in the system structure (D*u) is not incorporated into the updated state properly by lsim, but maybe my concept of what is "proper" is flawed. -EJR ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------