Learn R Programming

rcss (version 1.8)

Optimal: Optimal

Description

Find the maximising tangent at each grid point.

Usage

Optimal(grid, tangent)

Arguments

grid

Matrix representing the grid. The i-th row corresponds to i-th point of the grid. The j-th column captures the dimensions. The first column must equal to 1.

tangent

Matrix representing the collection of tangents, where the intercept [i,1] and slope [i,-1] describes a tangent at grid point i.

Value

Matrix representing the maximum of the tangents at each grid point, where the intercept [i,1] and slope [i,-1] describes the maximising tangent at grid point i.

Examples

Run this code
# NOT RUN {
grid <- as.matrix(cbind(rep(1, 81), c(seq(20, 60, length = 91))))
tangent <- matrix(rnorm(81 * 2), ncol = 2)
Optimal(grid, tangent)
# }

Run the code above in your browser using DataLab