Home > atmlab > mie > mierayleighxscan2.m

mierayleighxscan2

PURPOSE ^

Computation and plot of Mie Efficiencies for given

SYNOPSIS ^

function result = mierayleighxscan2(m, nsteps, dx, xmax, nmax)

DESCRIPTION ^

 Computation and plot of Mie Efficiencies for given 
 complex refractive-index ratio m=m'+im" 
 and range of size parameters x=k0*a, 
 starting at x=0 with nsteps increments of dx
 a=sphere radius, using complex Mie coefficients an and bn 
 according to Bohren and Huffman (1983) BEWI:TDD122
 result: m', m", x, efficiencies for extinction (qext), 
 scattering (qsca), absorption (qabs), backscattering (qb), 
 qratio=qb/qsca and asymmetry parameter (asy=<costeta>).
 nmax is a maximum order of spherical functions used only if
 d is to be computed (line 22)
 C. M�zler, May 2002.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mierayleighxscan2.m

SOURCE CODE ^

0001 function result = mierayleighxscan2(m, nsteps, dx, xmax, nmax)
0002 
0003 % Computation and plot of Mie Efficiencies for given
0004 % complex refractive-index ratio m=m'+im"
0005 % and range of size parameters x=k0*a,
0006 % starting at x=0 with nsteps increments of dx
0007 % a=sphere radius, using complex Mie coefficients an and bn
0008 % according to Bohren and Huffman (1983) BEWI:TDD122
0009 % result: m', m", x, efficiencies for extinction (qext),
0010 % scattering (qsca), absorption (qabs), backscattering (qb),
0011 % qratio=qb/qsca and asymmetry parameter (asy=<costeta>).
0012 % nmax is a maximum order of spherical functions used only if
0013 % d is to be computed (line 22)
0014 % C. M�zler, May 2002.
0015 
0016 nx=(1:nsteps)';
0017 x=0.1+(nx-1)*dx;
0018 for j = 1:nsteps,
0019     a(j,:)=mie(m,x(j));   % Mie Solution
0020     b(j,:)=mie_1(m,x(j),xmax); % Rayleigh Approximation (1st order)
0021 %   c(j,:)=mie_2(m,x(j),xmax); % Second Order Approximation
0022 %   d(j,:)=mie_nmax(m,x(j),nmax); % nmax Order of Approximation
0023 end;
0024 m1=real(m); m2=imag(m);
0025 %plot(x,a(:,param),'k-',x,b(:,param),'r-',x,c(:,param),'r-.',x,d(:,param),'k:')
0026 %legend('Mie','Rayleigh','2nd Order','n<=nmax')
0027 %title(sprintf('m = %g + %gi,  nmax = %g',m1,m2,nmax))
0028 param=1;
0029 subplot(1,2,1);
0030 loglog(x,a(:,param),'r-',x,b(:,param),'k--')
0031 title(sprintf('n = %g + %gi',m1,m2))
0032 xlabel('x'), ylabel('Qext');
0033 param=4;
0034 subplot(1,2,2);
0035 loglog(x,a(:,param),'r-',x,b(:,param),'k--')
0036 legend('Mie','Rayleigh')
0037 title(sprintf('n = %g + %gi',m1,m2))
0038 xlabel('x'), ylabel('Qb');
0039 
0040 %result=a;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005