how can integrate the Slamf with respect to lamda to plot sss versus v(number of iteration)

r1=(.32.^(.5)); r2=(.32.^(.5)); R1=(r1).^2; R2=(r2).^2; rext=.9; LD=345e-6; LR=100e-6; c=3e8; e=1.6e-19; alpha=30*1e-2; Jth=15e-3; %%%%%%%%% ratio=(J./Jth) ratio=1.1; T=LD./(c.*((alpha.*LD)-(log(sqrt(R1.*R2))))); g=1./(c.*T); g0=ratio./(c.*T); G=exp(g.*LD); V=exp(-alpha.*LD); %%%%%%%%%%%%%%%%%%%%%S1 first value of S eta=T./(e); S1=eta.*Jth.*(ratio-1); i=1; for v=1:21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% m=1505:1:1525; lamda=2*3.4*LD./m s=size(m'); for n2=1:s(1) reff1=main1(lamda(n2),LR); re=abs(reff1); Re = (re).^2; setaE=(angle(reff1)); setaD=(2*pi*3.4*LD)./lamda; % for V=1:10 %%%%%%%pratio= equation pratio=(g0./g)-1; Ssat=(S1./pratio); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%equivalent input at one diode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%mirror effective spectral power of %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%spontaneous emission h=6.625e-34; f(n2)=c./(lamda(n2)); dlam=20e-9;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Lamc=1.55e-6; % Qm=.002; Lamc=1.55e-6; n=3.4; Qm=1./((8.*pi.*(n.^3).*(18e-12.*LD).*dlam)./((lamda(n2)).^4)); flamda=(2.*((log(2)).^(.5))./(1.77.*dlam)).*(exp(-log(2.*(((lamda(n2)-Lamc)./(dlam./2)).^(2))))); W(n2)=Qm.*c.*g.*Ssat.*h.*f(n2); Wlamda(n2)=W(n2).* flamda; Plamdai(n2)=(Wlamda(n2)/2).*((((G.*V)-1))/log(G.*V)); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%photon Slam(n2)=((LD.*Plamdai(n2))./(c.*h.*f(n2))).*(4.*((((G.*V)-1)-log(G.*V))./(((G.*V)-1).*log(G.*V)))); Slamf(:,n2)=Slam(n2)+(((G.*V)-1)./(log(G.*V))).*((R1+Re+(2.*R1.*Re.*G.*V))./(1+(R1.*Re.*(G.^2).*(V.^2))-(2.*(sqrt(R1.*Re)).*G.*V.*(cos((2.*setaD)+setaE)))));
end
S2(:,i)=trapz(lamda,Slamf);
sss(:,i)=abs(S2);
% S2f=abs(S2);
if (sss-S1<=.1e-3)
break
else
S1=sss;
end
i=i+1;
end

Answers (0)

Asked:

on 13 Jan 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!