Calculates a_{n,1}, b_{n,1}, and b_{n,0} for n=1:nNmax for the incident dipole field using Eqs. H.88 and H.90. Parameters: - nNmax: integer scalar - xp: column vector [L x 1] wavelength-dependent xp=kM*Rp (Rp is distance from origin) Returns: structure with 3 fields each a matrix [L x nNmax] - stDipEabn1bn0.an1: a_{n,1} - stDipEabn1bn0.bn1: b_{n,1} - stDipEabn1bn0.bn0: b_{n,} This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 0002 stZnAll=GenZnAll(nNmax,xp,'h1'); 0003 % Z0 is xi(xp)/xp, Z2 is (x xi)'(xp)/xp 0004 % Z1 is xi(xp)/xp^2 0005 n=1:nNmax; 0006 0007 % Parallel dipole 0008 coeff1=3/8*(2*n+1); % [1 x nNmax] 0009 nCoeffmat=repmat(sqrt(coeff1),length(xp),1); % [L x nNmax] 0010 0011 stDipEabn1bn0.an1 = i * nCoeffmat .* stZnAll.Z0; 0012 stDipEabn1bn0.bn1 = - nCoeffmat .* stZnAll.Z2; 0013 0014 % Perpendicular dipole 0015 coeff2=4*coeff1.*n.*(n+1); % [1 x nNmax] 0016 nCoeffmat=repmat(sqrt(coeff2),length(xp),1); % [L x nNmax] 0017 0018 stDipEabn1bn0.bn0 = nCoeffmat .* stZnAll.Z1;