File: maximizeQuadratic.Rd

package info (click to toggle)
r-bioc-edger 3.40.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,484 kB
  • sloc: cpp: 1,425; ansic: 1,109; sh: 21; makefile: 5
file content (38 lines) | stat: -rw-r--r-- 993 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
\name{maximizeQuadratic}
\alias{maximizeQuadratic}

\title{Maximize a function given a table of values by quadratic interpolation.}

\description{
Maximize a function given a table of values by quadratic interpolation.
}

\usage{
maximizeQuadratic(y, x=1:ncol(y))
}

\arguments{ 
\item{y}{numeric matrix of response values.}

\item{x}{numeric matrix of inputs of the function of same dimension as \code{y}.  If a vector, must be a row vector of length equal to \code{ncol(y)}.}
}

\details{
For each row of \code{y}, finds the three \code{x} values bracketing the maximum of \code{y}, interpolates a quadatric
polyonomial through these \code{y} for these three values and solves for the location of the maximum of the polynomial.
}

\value{
numeric vector of length equal to \code{nrow(y)} giving the x-value at which \code{y} is maximized.
}

\author{Yunshun Chen and Gordon Smyth}

\examples{
y <- matrix(rnorm(5*9),5,9)
maximizeQuadratic(y)
}

\seealso{
\code{\link{maximizeInterpolant}}
}