I can not zero my transfer function

2 views (last 30 days)
Muadd Ghellai
Muadd Ghellai on 11 Feb 2019
Commented: Stephan on 11 Feb 2019
how do you do this ?
  1 Comment
Stephan
Stephan on 11 Feb 2019
Why did you delete the question? How do i do what?

Sign in to comment.

Answers (1)

Stephan
Stephan on 11 Feb 2019
Edited: Stephan on 11 Feb 2019
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

Community Treasure Hunt

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

Start Hunting!