- To enter the numerator
>> b=[1 1]
b =
1 1
- To enter the denominator
>> a=[1 -1 0.5]
a =
1.0000 -1.0000 0.5000
NOTE: if, for example the middle coef. was zero, you still have to enter it as zero, you should not ignore it otherwise the denominator will only be first order.
- To find the zeros and poles
>> [z,p]=tf2zp(b,a)
z =
-1
p =
0.5000 + 0.5000i
0.5000 - 0.5000i
where z and p are the vectors representing the zeros and poles of the system, respectively.
- To plot the zeros and poles
>> zplane(b,a)
or
>> zplane(z,p)
Figure 5:
Pole-zero plot
 |
- To get the partial fraction expansion
>> [R,P,K]=residuez(b,a)
R =
0.5000 - 1.5000i
0.5000 + 1.5000i
P =
0.5000 + 0.5000i
0.5000 - 0.5000i
K =
[]
The above is equivalent to