The BOTTOM LINE Quote Of The Day

The BOTTOM LINE Quote Of The Day

Don't Ever Tell GOD How BIG Your Problems are.
Just Tell Your Problems How BIG your GOD is ;)

Tuesday, May 15, 2012

Matlab 2


close all;
clear all;
C1=0.199*10^(-12);
C2=34.91*10^(-12);
C3=0.199*10^(-12);
L1=127*10^(-9);
L2=0.726*10^(-9);
L3=127*10^(-9);
S21=[];
S11=[];
F=[];
z=50;
for f=1:10^7:2*10^9
    w=2*pi*f;
    mat1=[1 j*w*L1;0 1];
    mat2=[1 1/(j*w*C1);0 1];
    mat3=[1 0;1/(j*w*L2) 1];
    mat4=[1 0;j*w*C2 1];
    mat5=[1 j*w*L3;0 1];
    mat6=[1 1/(j*w*C3);0 1];
    matf=mat1*mat2*mat3*mat4*mat5*mat6;
    a=matf(1,1);
    b=matf(1,2);
    c=matf(2,1);
    d=matf(2,2);
    S21=[S21 ; 2/(a+b/z+c*z+d)];
    S11=[S11 ; (a+b/z-c*z-d)/(a+b/z+c*z+d)];
    F=[F ;f];
end
plot(F,abs(S21),'r',F,abs(S11),'g');

No comments:

Post a Comment