Matlab and Octave support state-space models with functions such as
Let's repeat the previous example using Matlab:
>> num = [1 2 3]; % transfer function numerator >> den = [1 1/2 1/3]; % denominator coefficients >> [A,B,C,D] = tf2ss(num,den) A = -0.5000 -0.3333 1.0000 0 B = 1 0 C = 1.5000 2.6667 D = 1 >> [N,D] = ss2tf(A,B,C,D) N = 1.0000 2.0000 3.0000 D = 1.0000 0.5000 0.3333
The tf2ss and ss2tf functions are documented online at The Mathworks help desk as well as within Matlab or Octave itself (say help tf2ss).