Home > atmlab > mie > besselplot5.m

besselplot5

PURPOSE ^

Computation and plot of absolute values of

SYNOPSIS ^

function result = besselplot5(n, m, xmin, dx, nx)

DESCRIPTION ^

 Computation and plot of absolute values of 
 Riccati-Bessel Functions of Order n
 for complex argument z=m*x, used in Mie Theory. 
 input: order n, refractive index m, minimum x value xmin, 
 x interval dx, number of x values nx.
 C. M�zler, August 2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

besselplot5.m

SOURCE CODE ^

0001 function result = besselplot5(n, m, xmin, dx, nx)
0002 
0003 % Computation and plot of absolute values of
0004 % Riccati-Bessel Functions of Order n
0005 % for complex argument z=m*x, used in Mie Theory.
0006 % input: order n, refractive index m, minimum x value xmin,
0007 % x interval dx, number of x values nx.
0008 % C. M�zler, August 2002
0009 
0010 m1=real(m); m2=imag(m);
0011 nn=(1:nx)
0012 x=xmin+dx*nn;
0013 nu=n+0.5;
0014 z=m.*x;
0015 sqx= sqrt(0.5*pi*z); 
0016 psx = besselj(nu, z).*sqx
0017 chx = -bessely(nu, z).*sqx;
0018 a1=abs(psx);
0019 a2=abs(chx);
0020 r=[a1;1./a2];
0021 semilogy(x,r(1:2,:))
0022     legend('abs(psi_n(mx))','1/abs(chi_n(mx))')
0023     title(sprintf('Riccati-Bessel Functions of Order n=%g, for m=%g+%gi',n,m1,m2))
0024     xlabel('x')
0025 end;
0026 result=[a1(1),a1(nx);a2(1),a2(nx)];

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