Description Usage Arguments Author(s) References See Also Examples
The function calculates the value of j:th normalized Legendre polynomial at x. This function is a subfunction of IDM
.
1 | p.function(j, x)
|
j |
an integer giving the rank of the polynomial |
x |
numeric value between -1 and 1 |
Anna Kuparinen and Mats Bj<f6>rklund
Kirkpatrick M, Lofsvold D, Bulmer M (1990) Analysis of the inheritance, selection and evolution of growth trajectories. Genetics 124:979-993.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function (j, x)
{
temp1 = 1/(2^j) * sqrt((2 * j + 1)/2)
jj = floor(j/2)
temp2 = 0
for (i in 0:jj) {
temp2b = (-1)^i * factorial(j)/(factorial(i) * factorial(j -
i)) * factorial(2 * j - 2 * i)/(factorial(j) * factorial(2 *
j - 2 * i - j)) * x^(j - 2 * i)
temp2 = temp2 + temp2b
}
return(temp1 * temp2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.