Home > atmlab > mie > besselplot2.m

besselplot2

PURPOSE ^

Computation and plot of Logarithmic Derivatives of Riccati-Bessel Functions

SYNOPSIS ^

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

DESCRIPTION ^

 Computation and plot of Logarithmic Derivatives of Riccati-Bessel Functions 
 of Order n for complex argument z=m*x, 
 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 ^

besselplot2.m

SOURCE CODE ^

0001 function result = besselplot2(n, m, xmin, dx, nx)
0002 
0003 % Computation and plot of Logarithmic Derivatives of Riccati-Bessel Functions
0004 % of Order n for complex argument z=m*x,
0005 % input: order n, refractive index m, minimum x value xmin,
0006 % x interval dx, number of x values nx.
0007 % C. M�zler, August 2002
0008 
0009 m1=real(m);m2=imag(m);
0010 nn=(1:nx);
0011 x=xmin+dx*nn;
0012 nu=n+0.5;
0013 z=m.*x;
0014 sqz= sqrt(0.5*pi*z); 
0015 pz = besselj(nu, z).*sqz;       % Psi_n Function
0016 chz = -bessely(nu, z).*sqz;     % Chi_n Function
0017 p1z= besselj(nu-1, z).*sqz;     % Psi_n-1 Function
0018 ch1z= -bessely(nu-1, z).*sqz;;  % Chi_n-1 Function
0019 dz=p1z./pz-n./z;                % D_n =Psi_n'/Psi_n Function
0020 dcz=ch1z./chz-n./z;             % Dch_n =Chi_n'/Chi_n Function
0021 dz1=real(dz);
0022 dz2=imag(dz);
0023 dcz1=real(dcz);
0024 dcz2=imag(dcz);
0025 r=[dz1;dz2;dcz1;dcz2];
0026 
0027 plot(x,r(1:4,:))
0028 legend('real(d_n_p_s(mx))','imag(d_n_p_s(mx))','real(d_n_c_h(mx))','imag(d_n_c_h(mx))')
0029 title(sprintf('Logarithmic Derivatives of Riccati-Bessel Functions of Order n=%g, for m=%g+%gi',n,m1,m2))
0030 xlabel('x')
0031 result=[x;r];

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