Example script to run the function PweFullMonty It produces 6 figures that illustrate the capabilities of the Mie codes for a single sphere under PWE. See the function PweFullMonty for more details. This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 global noCheckSum; 0002 noCheckSum=true; 0003 % use 'clear all' or 'clear global noChecksum' to erase noCheckSum 0004 % clear global noCheckSum; % same as noCheckSum=false; 0005 % noCheckSum=false; 0006 0007 % N_{max} 0008 nNmax=50; 0009 0010 % sphere radius in nm (scalar [1 x 1]) 0011 a=30; 0012 0013 % wavelengths in nm (column vector [L x 1]) 0014 lambda=transpose(300:1:600); 0015 0016 % dielectric constant of outside medium (real positive scalar) 0017 epsilonM=1.77; % water 0018 %epsilonM=1.0; % air 0019 0020 % wavelength-dependent dielectric function of sphere material 0021 % vector column, same size as lambda [L x 1] 0022 epsilonIn=epsAg(lambda); % silver 0023 0024 nNbTheta=361; 0025 % selected wavelengths for plots 0026 lambda0=[432,373]; 0027 % Parameters to compute electric field everywhere at one wavelength 0028 % (lambda0(1)) 0029 rMax=4*a; 0030 nNbRout=300; 0031 nNbRin=100; 0032 0033 [stM,stEsurf,stEfarSca,CstEmap]= ... 0034 PweFullMonty(nNmax,a,lambda,epsilonM,epsilonIn,lambda0,nNbTheta,rMax,nNbRout,nNbRin);