Lookup values for a piecewise constant function

Share:

Description

Given the values and lefthand endpoints for intervals of constancy, lookup values of the function at arbitrary values of the independent variable.

Usage

1
  lookup(xgrid, ygrid, x, y0 = 0)

Arguments

xgrid

Lefthand endpoints of intervals of constancy

ygrid

Values on these intervals, of same length as xgrid

x

Input vector of arbitrary independent variables.

y0

Value to be returned for values of x that are smaller than min(xgrid).

Value

~Describe the value returned If it is a LIST, use

comp1

Description of 'comp1'

comp2

Description of 'comp2'

Author(s)

Grant Izmirlian <izmirlian@nih.gov>

Examples

1
  ## none as yet

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.