%HR2.M
%Number of frequencies
Nvals = 200;

%Specify the number of nodes
N = 6;

%initialise all y's
y = zeros(N,N-1,Nvals);
fc= 40.e6;
fco=40.e6;

frequency = linspace(.8*fc,1.2*fc,Nvals);
omega = 2*pi*frequency;

%specify an L and C in SI units
fac = 10; %the impedance scaling factor
sca = fco/fc; %the frequency scaling factor

Zo = 500./fac
C3 = fac*sca*.07e-12 % the coupling cap
rloss = 10./fac

C1 = 25.2e-12*sca*fac
C2 = 2.58e-12*sca*fac;
C2 = 2.82e-12*sca*fac
L1 = 6.e-6*sca/fac

L2 = L1
C4 = 2.49e-12*sca*fac

omc = 2*pi*fc;
Ro = Zo/(1 + (omc*Zo*C1)^2);
Rpar = ((omc*L1)^2 + Ro^2)/Ro;
Rparo = 50000/fac;
Xparo = 1/omc/C2;
Xpar = omc*C1*Zo*Zo/(1 + (omc*Zo*C1)^2);


C1 = 270e-12;
C2 = 28e-12;
C3 = .7e-12;
C4 = 25e-12;
L1 = 600e-9;

L2 = L1;
C5 = C3
L3 = L1
C6 = C2
C7 = C1


y(6,1,:) = j*omega*C1 + 1/Zo; 
y(6,2,:) = 1./(j*omega*L1 + rloss); 
y(6,3,:) = j*omega*C4 + 1./(j*omega*L2 + rloss); 
y(6,4,:) = 1./(j*omega*L3 + rloss); 
y(6,5,:) = 1/Zo + j*omega*C7;

y(1,2,:) = j*omega*C2;
y(2,1,:) = j*omega*C2;

y(3,2,:) = j*omega*C3;
y(2,3,:) = j*omega*C3;

y(3,4,:) = j*omega*C5;
y(4,3,:) = j*omega*C5;

y(5,4,:) = j*omega*C6;
y(4,5,:) = j*omega*C6;



