Next: Simulation
Up: Dynamical systems
Previous: Dynamical systems
-->s=poly(0,'s');
-->h=syslin('c',[1/s,1/(s+1);1/s/(s+1),1/(s+2)/(s+2)])
h =
! 1 1 !
! - ----- !
! s 1 + s !
! !
! 1 1 !
! ----- --------- !
! 2 2 !
! s + s 4 + 4s + s !
-->w=tf2ss(h); // compute state space representation
-->ss2tf(w) // back to transfer function represenation
ans =
! 1 1 !
! ------------- ----- !
! - 4.710D-16 + s 1 + s !
! !
! 1 + 6.935D-16s 1 + 2.448D-16s !
! ---------------- -------------- !
! 2 2 !
! - 1.610D-15 + s + s 4 + 4s + s !
-->h1=clean(ans) // set to zero the unsignificant coefficients
h1 =
! 1 1 !
! - ----- !
! s 1 + s !
! !
! 1 1 !
! ----- --------- !
! 2 2 !
! s + s 4 + 4s + s !
Scilab group