Home > atmlab > mie > mie2_cd.m

mie2_cd

PURPOSE ^

Computes a matrix of Mie coefficients, c_n, d_n, of orders

SYNOPSIS ^

function result = mie2_cd(eps1, mu1, x)

DESCRIPTION ^

 Computes a matrix of Mie coefficients, c_n, d_n, of orders
 n=1 to nmax, for given complex permittivity and permeability
 ratios eps1=eps1'+ieps1", mu1=mu1'+imu1" between inside and outside 
 of the sphere and size parameter x=k0*a 
 where k0= wave number in ambient medium for spheres of radius a;
 p. 100, 477 in Bohren and Huffman (1983), BEWI:TDD122
 C. M�zler, July 2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mie2_cd.m

SOURCE CODE ^

0001 function result = mie2_cd(eps1, mu1, x)
0002 
0003 % Computes a matrix of Mie coefficients, c_n, d_n, of orders
0004 % n=1 to nmax, for given complex permittivity and permeability
0005 % ratios eps1=eps1'+ieps1", mu1=mu1'+imu1" between inside and outside
0006 % of the sphere and size parameter x=k0*a
0007 % where k0= wave number in ambient medium for spheres of radius a;
0008 % p. 100, 477 in Bohren and Huffman (1983), BEWI:TDD122
0009 % C. M�zler, July 2002
0010 
0011 msq=eps1.*mu1;
0012 m=sqrt(msq);            % refractive index ratio
0013 z1=sqrt(mu1./eps1);           % impedance ratio
0014 nmax=round(2+x+4*x.^(1/3));
0015 nmx=round(max(nmax,abs(m))+16);
0016 n=(1:nmax); nu = (n+0.5); z=m.*x;
0017 cnx(nmx)=0+0i;
0018 for j=nmx:-1:2
0019     cnx(j-1)=j-z.*z./(cnx(j)+j);
0020 end;
0021 cnn=cnx(n);
0022 sqx= sqrt(0.5*pi./x); sqz= sqrt(0.5*pi./z);
0023 bx = besselj(nu, x).*sqx;
0024 bz = 1./besselj(nu, z)./sqz;
0025 yx = bessely(nu, x).*sqx;
0026 hx = bx+i*yx;
0027 b1x=[sin(x)/x, bx(1:nmax-1)];
0028 y1x=[-cos(x)/x, yx(1:nmax-1)];
0029 h1x= b1x+i*y1x;
0030 ax = x.*b1x-n.*bx;
0031 ahx= x.*h1x-n.*hx;
0032 nenn1=msq.*ahx-mu1.*hx.*cnn;
0033 nenn2=mu1.*ahx-hx.*cnn;
0034 cn = mu1.*bz.*(bx.*ahx-hx.*ax)./nenn2;
0035 dn = mu1.*m.*bz.*(bx.*ahx-hx.*ax)./nenn1;
0036 result=[cn; dn];

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