use matlab to find the poles and zeros of the following functions. 𝑀(𝑠) = 100𝑠(𝑠 − 1) (𝑠 + 2)(𝑠 2 + 3𝑠 + 2) 𝑀(𝑠) = 𝑒 −2𝑠 10𝑠(𝑠 + 1)(𝑠 + 2) in matlab

To find poles and zeros of a transfer function in MATLAB, you can use the tf function to create a transfer function model and then extract the poles and zeros using the pole and zero functions respectively.

Here's how you can find poles and zeros of the given transfer functions:

main.m
% Transfer function M(s) = 100s(s-1)(s+2)(s^2+3s+2)
numerator = 100*conv([1 0], conv([1 -1], [1 2]));
denominator = conv([1 3 2], [1 0]);

M = tf(numerator, denominator);
poles_M = pole(M);
zeros_M = zero(M);

% Transfer function M(s) = exp(-2s)10s(s+1)(s+2)
numerator = 10*conv([1 0], conv([1 1], [1 2]));
denominator = [1];

M = tf(numerator, denominator, 'InputDelay', 2);
poles_M = pole(M);
zeros_M = zero(M);
414 chars
16 lines

In this code snippet:

  • We create transfer functions M using the provided numerators and denominators.
  • We then use the pole and zero functions to find the poles and zeros of the transfer functions.

Make sure to run this code in a MATLAB environment where the Control System Toolbox is available.

gistlibby LogSnag