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).

marletta.m
n=50;
[x,w]=pd(n);t=x2t(n,x);D=deriv(n);X=mult(n);
V=0.75*(X-31*eye(n))*inv((eye(n)+X)*(4*eye(n)+X)^2);
A=-D^2+V;
A(n,:)=sum(5*eye(n)+8*D);
B=zeros(n);
B(n,:)=A(n,:)/(1.e10);
for i=1:n-1 B(i,i)=1;end;
[v,l]=eig(A,B);
L=diag(l);
[L,ind]=sort(L);
psi=v(:,ind);
L(1:11)

Contact us at files@mathworks.com