Code covered by the BSD License  

Highlights from
LaguerreEig

image thumbnail
from LaguerreEig by Damian Trif
Calculates numerical eigenvalues and eigenfunctions of Schroedinger problems on (0,infinity).

t=x2t(n,x)
function t=x2t(n,x)
% 
% Calculates the vector t=[L0;L1;...;Ln]*exp(-x/2) at x
% 
x=x(:)';
if n>=1 t(1,:)=ones(1,length(x)).*exp(-x/2);end;
if n>=2 t(2,:)=t(1,:)-x.*exp(-x/2);end;
if n>=3 for i=3:n
            t(i,:)=(2*i-3-x)/(i-1).*t(i-1,:)-(i-2)/(i-1)*t(i-2,:);
        end;
end;

Contact us at files@mathworks.com