sheet: Computes a 2D function values over a given area.

Description Usage Arguments Value See Also Examples

View source: R/sheet.R

Description

Computes a 2D function values over a given area.

Usage

1
sheet(f, lims, n = 101, plot = TRUE, ...)

Arguments

f

A list with name, other named arguments to f. See example below.

lims

a 2 x 2 array or data frame. the first row are the limits in the x axis, and the row 2 are the limits of the y axis.

n

a single scalar or a 2-elements array with the number of values in each direction.

plot

logical. Should display a plot?

...

further arguments passed to the function image.default.

Value

An array of the values computed.

See Also

sheet is the 2D analog of curve.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Example 1
ss <- function(x, y, m = 5) {m * x + y}
ex0=1; exf=4; ey0=6; eyf= 7
elims <- rbind(x = c(ex0, exf), y = c(ey0, eyf)); print(elims)
ez <- sheet(f=list(name = ss, m=10),
      lims= elims,
      n = c(exf-ex0 + 1, eyf-ey0 + 1))
print(ez)

# Example 2
ez <- sheet(f=list(name=ss), lims = elims)

mathphysmx/bernstein documentation built on Sept. 3, 2019, 12:57 p.m.