f1=1;
f2=39;
f = Sdb(f1:f2,1);
S1=Sdb(f1:f2,2);
S2=Sdb(f1:f2,3);
S3=srr_P(f1:f2,2);
S4=srr_P(f1:f2,3);
>> s1=10.^(S1/20);
s2=10.^(S2/20);
s3= S3*180/pi;
s4= S4*180/pi;
>> ss3=s3*pi/180;
ss4=s4*pi/180;
s11 = s1.*exp(j*ss3);
s21 = s2.*exp(j*ss4);
lambda=0.3./f;
k=2*pi./lambda;
d=(2.5)*1e-3; %表示2.5乘以10的负3次方,d为介质板厚度
>> figure;
plot(f,abs(s11)); hold on; grid;
plot(f,abs(s21),'r');
xlabel('Frequency [GHz]');ylabel('Magnitude of S');
title('Magnitude of S v.s. f');
legend('S_1_1','S_2_1');
axis([f(1) f(length(f)) 0 1]);
alpha=(1-s11.^2+s21.^2)./(2*s21);
n=(1./(k*d)).*acos(a