1 | rho.bt(x, c1, M)
|
x |
|
c1 |
|
M |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, c1, M)
{
x1 <- (x - M)/c1
ivec1 <- (x1 < 0)
ivec2 <- (x1 > 1)
return(ivec1 * (x^2/2) + ivec2 * (M^2/2 + c1 * (5 * c1 +
16 * M)/30) + (1 - ivec1 - ivec2) * (M^2/2 - M^2 * (M^4 -
5 * M^2 * c1^2 + 15 * c1^4)/(30 * c1^4) + (1/2 + M^4/(2 *
c1^4) - M^2/c1^2) * x^2 + (4 * M/(3 * c1^2) - 4 * M^3/(3 *
c1^4)) * x^3 + (3 * M^2/(2 * c1^4) - 1/(2 * c1^2)) *
x^4 - 4 * M * x^5/(5 * c1^4) + x^6/(6 * c1^4)))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.