
f1=[1000 4000 10000 20000 40000 100000 150000 200000 400000 500000 1000000];
z=123.4;
a=1;
b=4.321;

f=4000:4000:1060000;d=4000;
r1=[268 268 268 269  271 282 295 312 390 425 603];
l1=10^(-6).*[680 680 678 675 669 650 642 635 619 608 574];
%c5=polyfit(f1,r1,3);

%c15=polyfit(f1,l1,3);
%r=polyval(c5,f);
%l=polyval(c15,f);
r=spline(f1,r1,f);
l=spline(f1,l1,f);
c=10^(-9)*45.5.*ones(size(f));
g=zeros(size(f));z1=zeros(size(f));y=zeros(size(f));d1=3*.3048; d5=6*.3048;d7=1.5*.03048; %ultima portiune;
for k=1:length(f);
z1(k)=r(k)+2*pi*f(k)*l(k)*i;
y(k)=g(k)+2*pi*f(k)*c(k)*i;
zc(k)=sqrt(z1(k)/y(k));
gamma(k)=sqrt(z1(k)*y(k));
alfa(k)=real(gamma(k));
beta(k)=imag(gamma(k));
tu(k)=r(k)/(2*pi*f(k)*l(k));
if tu(k)>=10
   zc1(k)= (1-i)*sqrt(r(k)/(4*pi*c(k)*f(k)));
   alfa1(k)=sqrt(r(k)*pi*c(k)*f(k));
   beta1(k)=alfa1(k);
elseif (tu(k)>=.4)&(tu(k)<10)
   zc1(k)=z;
   alfa1(k)=a;
   beta1(k)=b;
else
   v(k)=sqrt(l(k)/c(k));
   zc1(k)=v(k)*(1-i*r(k)/(l(k)*4*pi*f(k)));
   alfa1(k)=r(k)/(2*v(k));
   beta1(k)=2*pi*f(k)*sqrt(l(k)*c(k));
end
end