No BSD License
-
AssociatedLaguerrePoly(n,k)
AssociatedLaguerrePoly.m by David Terr, Raytheon, 5-11-04
-
ChebyshevExpansion(f)
ChebyshevExpansion.m by David Terr, Raytheon, 5-26-04
-
ChebyshevPoly(n)
ChebyshevPoly.m by David Terr, Raytheon, 5-10-04
-
HermitePoly(n)
HermitePoly.m by David Terr, Raytheon, 5-10-04
-
LaguerrePoly(n)
LaguerrePoly.m by David Terr, Raytheon, 5-11-04
-
LegendreExpansion(f)
LegendrePolyExpansion.m by David Terr, Raytheon, 5-26-04
-
LegendrePoly(n)
LegendrePoly.m by David Terr, Raytheon, 5-10-04
-
ChebyPlot.m
-
HermitePlot.m
-
LaguerrePlot.m
-
LegendrePlot.m
-
View all files
from
SpecialFunctions.zip
by David Terr
Special functions archive.
|
| LaguerrePoly(n)
|
% LaguerrePoly.m by David Terr, Raytheon, 5-11-04
% Given nonnegative integer n, compute the
% Laguerre polynomial L_n. Return the result as a vector whose mth
% element is the coefficient of x^(n+1-m).
% polyval(LaguerrePoly(n),x) evaluates L_n(x).
function Lk = LaguerrePoly(n)
if n==0
Lk = 1;
elseif n==1
Lk = [-1 1];
else
Lkm2 = zeros(n+1,1);
Lkm2(n+1) = 1;
Lkm1 = zeros(n+1,1);
Lkm1(n) = -1;
Lkm1(n+1) = 1;
for k=2:n
Lk = zeros(n+1,1);
for e=n-k+1:n
Lk(e) = (2*k-1)*Lkm1(e) - Lkm1(e+1) + (1-k)*Lkm2(e);
end
Lk(n+1) = (2*k-1)*Lkm1(n+1) + (1-k)*Lkm2(n+1);
Lk = Lk/k;
if k<n
Lkm2 = Lkm1;
Lkm1 = Lk;
end
end
end
|
|
Contact us at files@mathworks.com