44
3 Legendre Polynomials and Legendre Functions
for which the Legendre function shall be evaluated. The output “res” is a structure
with fields “x” at which the Legendre function was evaluated and fields “Pl”
with the function values. “l” lists the l-values for which the Legendre function
was evaluated and “info” a general information. Lvaluea: optional inputs are
the following property–value pair arguments: “x” with value x at which the
Legendre function shall be evaluated, but now based on the polar angle picture;
default is linspace(0,pi), “angle” with value “r(ad)” (default), and “d(egree).”
r(ad) means all values are allowed with leading r and d(egree) all values are
allowed with leading d. In addition, the pair “l” with values as described for
Lvaluea is allowed. The return values are equivalent to Lvaluea. The method
plot(obj,varargin) supports the optional property–value pair arguments
(see methods above): “x” with value x at which the Legendre function shall
be evaluated; for example, x=linspace(-2,2) default is linspace(0,1),
“angle” with the values “r(ad),” “d(egree),” “x,” or “z”; “l” values between |m| and
lmax for which the Legendre functions shall be plotted, and “axis” with the object
axes handle which shall be used for the plot. Default is to open a new figure.
The following recurrence formula is useful to derive the associate Legendre
functions, either their polynomial structure or their function value at position z:
(ν − μ + 1)P
μ
ν+1 (z) = (2ν + 1)zP
μ
ν (z) − (ν − μ)P
μ
ν−1 (z).
(3.17)
More recurrence formulas can be found in [1,3]. Whereas recurrence relation (3.17)
is stable, most recurrence formulas with varying m are numerically unstable. Initial
values for the first recursion are given by
P
m
l = 0 if |m| > l
(3.18a)
and
P
m
m (x) = (−1)
m (2m − 1)!!(1 − x
2 )
(m/2) , P
m
m (z) = (2m − 1)!!(z
2
− 1)
(m/2) ,
(3.18b)
P
m
m+1 (x) = x(2m + 1)P
m
m (x) , P
m
m+1 (z) = z(2m + 1)P
m
m (z).
(3.18c)
The class Plm serves for the direct computation of values of the associate Legendre
function. obj = Plm(l,m,x) returns the class object “obj” with the property
“values” with all function values of P
m
˜
l
(x) for |m| ≤ ˜
l ≤ l, the property “x” at
which the associate Legendre functions were evaluated and “lm” with the list of
corresponding (lm)-pairs. Example:
>> x = [0, 0.25, 0.5, 0.75, 1.0
0,-0.25,-0.5,-0.75,-1.0];
>> res = Plm(4,2,x).value
res =
struct with fields:
Précédent

- 59/287

Suivant