MATLAB Functions | Help Desk |
legendre
Associated Legendre functions
PThe Legendre functions are defined by:=
legendre(n,X) S = legendre(n,X,'sch')
P = legendre(n,X)
computes the associated Legendre functions of degree n
and order m = 0,1,...,n
, evaluated at X
. Argument n
must be a scalar integer less than 256, and X
must contain real values in the domain
The returned array P
has one more dimension than X
, and each element P(m+1,d1,d2...)
contains the associated Legendre function of degree n
and order m
evaluated at X(d1,d2...)
.
If X
is a vector, then P
is a matrix of the form:S = legendre(...,'sch')
computes the Schmidt seminormalized associated Legendre functions
.
The statement legendre(2,0:0.1:0.2)
returns the matrix:
|
---|
X = rand(2,4,5); N = 2; P = legendre(N,X)Then
size(P)
is 3-by-2-by-4-by-5, and P(:,1,2,3)
is the same as legendre(n,X(1,2,3))
.