How can I pass a transfer function tf() into fvtool() ?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mohammed Al-Sayegh
le 7 Fév 2018
Réponse apportée : Davis
le 2 Déc 2022
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
0 commentaires
Réponse acceptée
Davis
le 2 Déc 2022
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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!