lsim Simulate time response of dynamic systems to arbitrary inputs. 3 w; Q5 ]- r' r P l% U! V) b3 ^" h9 s/ E+ S
[Y,T,X] = lsim(SYS,U,T,X0)0 c4 G" f2 }! P) Y# N2 v
also returns the state trajectory X, a matrix with LENGTH(T) rows 4 x N* \+ M! w) ]' m9 U+ z and as many columns as states.