num = [1 2 3 2 1] den = [1 4 7 6 2] zeros = roots(num) Problem 4: This problem introduces several MATLAB commands that are useful for working

with the transfer function representation of a LTI system. As an example, consider a LTI system

described by the transfer function

$4 + 283 + 382 + 2s + 1

H($) = 4+ 483 + 782 + 6s + 2′

a) Using the MATLAB command roots, determine the poles and the zeros of the transfer function

H(s).

b) In a previous homework we have learned that an LTI system can be represented in MATLAB

in terms of P and Q of the ODE representation of the system. Using these polynomials in

conjunction with either the step or Isim commands allows us to find the response of a LTI

system. We also have seen in class that the transfer function for the LTI system described by

the ODE

Q (D)y (t) = P(D)f(t)

is

H (s) =

Y(s)

P(s)

F(s)

Q (s )

And, so it is also possible to represent a transfer function in MATLAB using the polynomials

P and Q. In order to simplify the representation of LTI systems, MATLAB packages the

polynomials P and Q into a single structure using the command of

gt; gt; sys = tf (P, Q)

where P and Q are vectors and sys is a variable that represents the system. Now, generate a

pole-zero map of the transfer function above using the MATLAB commandEngineering Technology