Listing U

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

clc;clear;

%%
w=1.01*(10^5); % omeganya diganti-ganti!
Yg= 10^-6;
G = 1/(10^4);
p= j*w;
C= 10^-9;
Yl= 10^-6;
Ig= 10^-3;
%%
A(1,1)= Yg+G+(p*C); A(1,2)= 0;
A(1,3)=
A(2,1)= 0;
A(2,2)= G+(p*C)+Yl; A(2,3)=
A(3,1)= -(p*C);
A(3,2)= -(p*C);
A(3,3)=
A(4,1)= -(G);
A(4,2)= -(G);
A(4,3)=
*p*C);

-(p*C);
-(p*C);
(2*G)+(2*p*C);
0;

A(1,4)=
A(2,4)=
A(3,4)=
A(4,4)=

-(G);
-(G);
0;
(2*G)+(2

[bar,kol]=size(A);
B = [Ig;0;0;0];
x=1;
y=1;
%%
while x<=bar
while y<=kol
A(x,:)=[];
A(:,y)=[];
min = (-1)^(x+y);
k(x,y)=min*det(A);
y=y+1;
A(1,1)= Yg+G+(p*C); A(1,2)= 0;

A(1,3)= -(p*C);

A(1,4)= -(G)

A(2,2)= G+(p*C)+Yl; A(2,3)= -(p*C);

A(2,4)= -(G)

;
A(2,1)= 0;
;
A(3,1)= -(p*C);
A(3,2)= -(p*C);
A(4,1)= -(G);
A(4,2)= -(G);
)+(2*p*C);
end
x=x+1;
y=1;
end
k;
%%
A(1,1)= Yg+G+(p*C); A(1,2)= 0;
A(2,1)= 0;
A(2,2)= G+(p*C)+Yl;
A(3,1)= -(p*C);
A(3,2)= -(p*C);
A(4,1)= -(G);
A(4,2)= -(G);
*p*C);
%%
U = (1/det(A))*k'*B;
U

A(3,3)= (2*G)+(2*p*C); A(3,4)= 0;


A(4,3)= 0;
A(4,4)= (2*G

A(1,3)=
A(2,3)=
A(3,3)=
A(4,3)=

-(p*C);
-(p*C);
(2*G)+(2*p*C);
0;

A(1,4)=
A(2,4)=
A(3,4)=
A(4,4)=

-(G);
-(G);
0;
(2*G)+(2

You might also like