0001
0002
0003
0004
0005 global noCheckSum;
0006 noCheckSum=true;
0007
0008
0009
0010 nNmax=50;
0011
0012
0013 a=25;
0014
0015
0016 lambda=transpose(300:1:600);
0017
0018
0019 epsilonM=1.0;
0020
0021
0022 scrsz = get(0,'ScreenSize');
0023 figAspectRatio=3;
0024 figWidth=3/4*scrsz(3);
0025 figure('Name','Fig. 4.2', ...
0026 'Position',[(scrsz(3)-figWidth)/2 scrsz(4)-150-figWidth/figAspectRatio figWidth figWidth/figAspectRatio]);
0027
0028
0029 d=1;
0030
0031 eGlass=2.25;
0032 eAg=epsAg(lambda);
0033
0034
0035 stMGlass=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,eGlass,'noplot','coeff');
0036 stMAg=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,eAg,'noplot','coeff');
0037
0038
0039
0040
0041
0042
0043
0044 stPtA=struct('x',a+d,'y',0,'z',0);
0045
0046 stEptGlass=PweEpts(lambda,epsilonM,stMGlass,stPtA,'Outside');
0047 stEptAg=PweEpts(lambda,epsilonM,stMAg,stPtA,'Outside');
0048
0049
0050
0051
0052
0053
0054
0055
0056 subplot(1,2,1);
0057 plot(lambda,stEptGlass.MLoc);
0058 axis([275 625 2.25 2.81]);
0059 title('Glass sphere in air - a=25nm');
0060 xlabel('Wavelength [nm]');
0061 ylabel('M_{Loc}(A)');
0062
0063
0064 subplot(1,2,2);
0065 semilogy(lambda,stEptAg.MLoc);
0066 axis([275 625 0.5 4000]);
0067 title('Silver sphere in air - a=25nm');
0068 xlabel('Wavelength [nm]');
0069 ylabel('M_{Loc}(A)');