clc;
clear all;
close all;
clf;
s1=0;
b=[0.6961663,0.4079426,0.8974794];
la=[0.0684043,0.1162414,9.896161];
Data = []; %定义空数组便于存数据
Dat = [];
for lax=1.2:0.2:2;
for i=1:3
s1=s1+(b(i)*lax^2)/(lax^2-la(i)^2);
end
s1=(1+s1)^1/2;
Data = [Data; s1]; %保存每次循环的S1值
Dat=[Dat;lax];%保存每次循环的变量值
end
VR=Data(:)';%将竖行换横行
VRq=Dat(:)';
figure(1);
plot(VRq,VR,'b');
xlabel('wavelength(μm)')
ylabel('Refractive index')