You are on page 1of 1

clear

clc
R1=2;
R2=6;
R3=1;
L1=3;
L2=4;
L3=1;
syms s vi I1 I2 I3 t
x1=L1*s;
x2=L2*s;
x3=L3*s;

[co1,co2,co3]=solve((x1+R1)*I1 -R1*I2==vi,(-R1*I1)+(R1+R2+x2)*I2-R2*I3==0,(-R2*I2)+
(R2+R3+x3)*I3==0,I1,I2,I3);
Vo=co3*x3;
G=Vo/vi
fprintf('Ganancia')
pretty(G)
[num1,den1]=numden(G)
num=sym2poly(num1);
den=sym2poly(den1);
H=tf(num,den);
figure(1)
bode(H)
hold on
figure (2)
rlocus(H)

You might also like