View source: R/display-andrews.r
andrews | R Documentation |
This function takes a numeric vector of input, and returns a function which allows you to compute the value of the Andrew's curve at every point along its path from -pi to pi.
andrews(x)
x |
input a new parameter |
a function with single argument, theta
a <- andrews(1:2)
a(0)
a(-pi)
grid <- seq(-pi, pi, length = 50)
a(grid)
plot(grid, andrews(1:2)(grid), type = "l")
plot(grid, andrews(runif(5))(grid), type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.