next up previous contents
Next: Zeros, poles and gain Up: System creation Previous: System creation

Transfer function

In order to enter a transfer function you need to specify a numerator and a denominator. For example:

Given the transfer function,

$\displaystyle H(z)=\frac{1+2z^{-2}}{1+3z^{-1}-0.5z^{-2}}$    

you may enter the system in the following way:
>> num=[1 0 2]

num =

     1     0     2

>> den=[1 3 -0.5]

den =

    1.0000    3.0000   -0.5000

>> sys=tf(num,den,-1)
 
Transfer function:
    z^2 + 2
---------------
z^2 + 3 z - 0.5
 
Sampling time: unspecified
Note that while entering the data for the numerator, we had to specifically put zero as the coefficient for $ z^{-1}$. Also, in the function tf, if we don't have a specific sampling rate, you need to put a -1 as the last argument.

Copyright © 2004, Aly El-Osery
Last Modified 2005-10-27