You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% RB2 the Ricatti-Bessel function of the second kind% RB2(rho, nmax) for the value rho from n=1 to n=nmax.% Written by and copyright% Dave Barnett% Optical Engineering Group% Dept. of Electrical and Electronic Engineering% Loughborough University% 20th November 1996% Modified 13th December 1998% Generalised to receive vectors of rho and return matrices.% Modified 8th January 1999% Zeta matrix allocated at start of function.function zeta = RB2(rho, nmax)rho = rho(:).';zeta = zeros(nmax,length(rho));zeta(1,:) = -cos(rho)./rho - sin(rho);zeta(2,:) = 3*zeta(1,:)./rho + cos(rho);for n=3:nmax zeta(n,:) = (2*n-1)*zeta(n-1,:)./rho - zeta(n-2,:);end