| MATLAB Function Reference | ![]() |
Syntax
P=legendre(n,X) S = legendre(n,X,'sch')
Definition
Schmidt seminormalized associated Legendre 函數與 nonnormalized associated Legendre 函數
之間的關聯是:
Description
P = legendre(n,X)
計算 X 維度 n 的 associated Legendre 函數令 m = 0,1,...,n。參數 n 必須是小於 256 的整數,
而 X 在 -1
x
1 必須有實數的值。
回傳的陣列 P 維度比 X 多一維,每個元素 P(m+1,d1,d2...) 包含由維度 n 且等級 m 的 X(d1,d2...) 求得的associated Legendre 函數。
S = legendre(...,'sch')
計算 the Schmidt seminormalized associated Legendre 函數
。
Examples
陳術式 legendre(2,0:0.1:0.2) 會傳回一個矩陣:
| x = 0 |
x = 0.1 |
x = 0.2 |
|
| m = 0 |
-0.5000 |
-0.4850 |
-0.4400 |
| m = 1 |
0 |
-0.2985 |
-0.5879 |
| m = 2 |
3.0000 |
2.9700 |
2.8800 |
X = rand(2,4,5); N = 2; P = legendre(N,X)
則 size(P) 會是 3-by-2-by-4-by-5,且 P(:,1,2,3) 與 legendre(n,X(1,2,3)) 是相同的。
| legend | length | ![]() |