Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/maximizeQuadratic.R
Maximize a function given a table of values by quadratic interpolation.
1 | maximizeQuadratic(y, x=1:ncol(y))
|
y |
numeric matrix of response values. |
x |
numeric matrix of inputs of the function of same dimension as |
For each row of y
, finds the three x
values bracketing the maximum of y
, interpolates a quadatric
polyonomial through these y
for these three values and solves for the location of the maximum of the polynomial.
numeric vector of length equal to nrow(y)
giving the x-value at which y
is maximized.
Yunshun Chen and Gordon Smyth
1 2 | y <- matrix(rnorm(5*9),5,9)
maximizeQuadratic(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.