Home > atmlab > mie > mie2_ab.m

mie2_ab

PURPOSE ^

Computes a matrix of Mie Coefficients, an, bn, of order

SYNOPSIS ^

function result = mie2_ab(eps1,mu1,x)

DESCRIPTION ^

 Computes a matrix of Mie Coefficients, an, bn, of order
 n=1 to nmax, for given complex permittivity and permeability
 ratios eps1=eps1'+ieps1", mu1=mu1'+imu1" between inside and outside 
 of the sphereand size parameter x=k0*a 
 where k0= wave number in ambient medium for spheres of radius a;
 Eq. (4.88) of Bohren and Huffman (1983), BEWI:TDD122
 C. M�zler, July 2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mie2_ab.m

SOURCE CODE ^

0001 function result = mie2_ab(eps1,mu1,x)
0002 
0003 % Computes a matrix of Mie Coefficients, an, bn, of order
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 sphereand size parameter x=k0*a
0007 % where k0= wave number in ambient medium for spheres of radius a;
0008 % Eq. (4.88) of Bohren and Huffman (1983), BEWI:TDD122
0009 % C. M�zler, July 2002
0010 
0011 m=sqrt(eps1.*mu1);            % refractive index ratio
0012 z=m.*x;
0013 z1=sqrt(mu1./eps1);           % impedance ratio
0014 nmax=round(2+x+4*x.^(1/3));
0015 nmx=round(max(nmax,abs(z))+16);
0016 n=(1:nmax); nu = (n+0.5); 
0017 sx=sqrt(0.5*pi*x);
0018 px=sx.*besselj(nu,x);
0019 p1x=[sin(x), px(1:nmax-1)];
0020 chx=-sx.*bessely(nu,x);
0021 ch1x=[cos(x), chx(1:nmax-1)];
0022 gsx=px-i*chx; gs1x=p1x-i*ch1x;
0023 dnx(nmx)=0+0i;
0024 for j=nmx:-1:2      % Computation of Dn(z) according to (4.89) of B+H (1983)
0025     dnx(j-1)=j./z-1/(dnx(j)+j./z);
0026 end;
0027 dn=dnx(n);
0028 da=dn.*z1+n./x; 
0029 db=dn./z1+n./x;
0030 
0031 an=(da.*px-p1x)./(da.*gsx-gs1x);
0032 bn=(db.*px-p1x)./(db.*gsx-gs1x);
0033 
0034 result=[an; bn];

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