I can not zero my transfer function
Afficher commentaires plus anciens
how do you do this ?
1 commentaire
Stephan
le 11 Fév 2019
Why did you delete the question? How do i do what?
Réponses (1)
Hi,
i assume you want to use zero instaed of zeros. The first is for control - the second creates an array of all zeros, which makes no sense in your context. Also note that you wrote
z=zero(Tfx)
instead of
z=zero(TFx)
Both is fixed here and works:
clear all
close all
clc
syms X Y s
F1 = (5*s^2+12*s+5)*X-(8*s+4)*Y; %laplace by hand
F2 = (3*s^2+8*s+5)*Y-(8*s+4)*X-(5/s);
[A B] = equationsToMatrix([F1 F2],[X Y]);
sol = inv(A)*B;
x = sol(1);
y = sol(2);
[Numx,Denx] = numden(x);
[Numy,Deny] = numden(y);
Nx = sym2poly(Numx);
Dx = sym2poly(Denx);
[r p k] = residue(Nx,Dx)
TFx = tf(Nx,Dx)
xp=poles(x)
yp = poles(y)
z=zero(TFx)
Best regards
Stephan
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!