0001 lambda=stMdip.lambda;
0002
0003 figure('Name','Decay rate EFs');
0004 title(['Mie dipole emission: nNmax=' ...
0005 int2str(stMdip.nNmax) ', a=' num2str(stMdip.a) 'nm, d=' num2str(stMdip.d) 'nm']);
0006
0007 if nargin<3
0008 semilogy(lambda,stMdip.MRadPerp,'b-',lambda,stMdip.MTotPerp,'b:', ...
0009 lambda,stMdip.MRadPara,'r-',lambda,stMdip.MTotPara,'r:');
0010 xlabel('Wavelength [nm]');
0011 ylabel('Decay rate EFs');
0012 legend({'M_{Rad}^{Perp}','M_{Tot}^{Perp}', ...
0013 'M_{Rad}^{Para}','M_{Tot}^{Para}'});
0014 else
0015 pxnorm2=px.^2./(px.^2+pz.^2);
0016 pznorm2=pz.^2./(px.^2+pz.^2);
0017 nNbP=length(px);
0018 pxnorm2=reshape(pxnorm2,1,nNbP);
0019 pznorm2=reshape(pznorm2,1,nNbP);
0020
0021 MRad=(stMdip.MRadPara * pxnorm2) + (stMdip.MRadPerp * pznorm2);
0022 MTot=(stMdip.MTotPara * pxnorm2) + (stMdip.MTotPerp * pznorm2);
0023
0024 hg=semilogy(lambda,MRad(:,1),'-');
0025 line(lambda,MTot(:,1),'LineStyle',':','Color',get(hg(1),'Color'));
0026 xlabel('Wavelength [nm]');
0027 ylabel('Decay rate EFs');
0028 CsLegend=cell(1,2*nNbP);
0029 CsLegend{1}=['M_{Rad} - px=' num2str(px(1)) ',pz=' num2str(pz(1))];
0030 CsLegend{2}=['M_{Tot} - px=' num2str(px(1)) ',pz=' num2str(pz(1))];
0031
0032 hold on;
0033 colVec=get(gca,'ColorOrder');
0034 nNbCol=length(colVec);
0035 for pp=2:nNbP
0036 CsLegend{2*pp-1}=['M_{Rad} - px=' num2str(px(pp)) ',pz=' num2str(pz(pp))];
0037 CsLegend{2*pp}=['M_{Tot} - px=' num2str(px(pp)) ',pz=' num2str(pz(pp))];
0038 line(lambda,MRad(:,pp),'LineStyle','-','Color',colVec(1+mod(pp-1,nNbCol),:));
0039 line(lambda,MTot(:,pp),'LineStyle',':','Color',colVec(1+mod(pp-1,nNbCol),:));
0040 end
0041 legend(CsLegend);
0042 end
0043 title(['Mie dipole: nNmax=' int2str(stMdip.nNmax) ...
0044 ', nNmaxESA=' int2str(stMdip.nNmaxESA) ', a=' num2str(stMdip.a) 'nm' ...
0045 ', d=' num2str(stMdip.d) 'nm']);
0046
0047