iloop=1;
g=inline('exp(-((353.35-x).^2)/(.1802)^2)/0.3194');
XL=150;
XH=400;
dX=(XH-XL)/250;
X=linspace(150,400,250);
gg=0;
for iloop=1:length(X)
    NN2=0.;
    gg=0.;
    for nline=6:30
       [a1,a2,a3,err]=diff_backscatter(354.7,X(iloop),nline,-1,'nitrogen');
       gg=gg+g(a3);
       NN2=NN2+g(a3)*a1;
    end
    NN2=NN2/gg;
    NO2=0.;
    gg=0.;
    for oline=6:30
        [a1,a2,a3,err]=diff_backscatter(354.7,X(iloop),oline,-1,'oxygen');
        gg=gg+g(a3);
        NO2=NO2+(0.21/.78)*g(a3)*a1;
    end
    NO2=NO2/gg;
    Q_NN2(iloop)=NN2;
    Q_NO2(iloop)=NO2;
    Q_comb(iloop)=NN2+NO2;
end

% figure
% plot(X,(Q_comb))
% hold on
% %plot(X,1/Q_NN2,'r')
% %plot(X,1/Q_NO2,'g')
% legend
