How can I pass a transfer function tf() into fvtool() ?

Hi, I am try to pass different values of transfer faction into fvtool. But, I have a error said "FVTool does not accept cell arrays as inputs". I would like to plot the pole and zeros of a transfer function in (real vs. im plane). If I did it manually and create array, it will works just fine but I am looking to find a way to get these value directly from the transfer function.
alpha_sweep = linspace(0.1,1,5);
wn = 100;
for x = 1:(length(alpha_sweep))
alpha = alpha_sweep(x);
H(x) = tf((142.857+(10000*alpha)),[alpha*1,140*alpha,alpha*wn^2]);
fvtool((H(x).Denominator),(H(x).Numerator),'polezero')
[b,a] = eqtflength(H(x).Denominator,H(x).Numerator);
[z1,p1,k1] = tf2zp(H(x).Denominator,H(x).Numerator)
text(real(z1)+.1,imag(z1),'Zero')
text(real(p1)+.1,imag(p1),'Pole');
end
Thanks,
Mohammed

 Accepted Answer

I just found this question when I was searching for the same answer, You can convert the cell arrays to a matrix using cell2mat, i.e.:
fvtool(cell2mat(H(x).Numerator),cell2mat(H(x).Denominator),'polezero')
BTW, you reveresed the order of the numerator and denominator terms in fvtool.

More Answers (0)

Asked:

on 7 Feb 2018

Answered:

on 2 Dec 2022

Community Treasure Hunt

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

Start Hunting!