Plotting poles and zeros

5 次查看(过去 30 天)
Sadi M Jawad Ahsan
Sadi M Jawad Ahsan 2022-5-11
When i run the following code it gives me error Check for incorrect argument data type or missing argument in call to function 'pzplot'.
MATLAB Code:
figure(3)
pzplot(b,a)
axis square
xlabel('Real'); ylabel('Imag');
title('Poles and Zeros of Butterworth IIR filter')
Wondering what the problem is.

回答(1 个)

Star Strider
Star Strider 2022-5-11
I am also wondering, however I am reasonably confident that ‘b’ and ‘a’ are not derived from a Control System Toolbox tf function (that pzplot is used with), and instead are from a Signal Processing Toolbox filter function, or something similar. If my guess is correct, the zplane funciton would be appropriate if it is a discrete filter. (I cannot find a similar function for analog prototypes, so simply plotting the real and imaginary components of the poles and zeros for an analog filter, with their appropriate symbols, would be necessary.)
  2 个评论
Sadi M Jawad Ahsan
Sadi M Jawad Ahsan 2022-5-11
This code is written for continuous time iir filter design. Later will have to transform the code for discrete time. What do you suggest I do? Could you please suggest the changes in the code?
Star Strider
Star Strider 2022-5-11
All the code does is plot!
For a continuous time filter, use the roots function separately on the numerator and denominator or use the tf2zp function to get the poles and zeros as complex quantities. To convert it to a discrete filter, the easiest way is to use the bilinear function, however I do not know what instructions you were given in that regard with respect to what appears to be a homework problem.

请先登录,再进行评论。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by