aitoa.function.to.matrix: Create the Data Needed for Plotting a Function in 3D

Description Usage Arguments Value

View source: R/function_to_matrix.R

Description

Create the x, y, and z data needed to plot a function in 3D

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
aitoa.function.to.matrix(
  x.min = -5,
  x.max = if (x.min < 0) -x.min else if (x.min == 0) 1 else max((x.min + 1), 1.1 *
    x.min),
  y.min = x.min,
  y.max = x.max,
  n.points.x = 101L,
  n.points.y = n.points.x,
  f = aitoa.rosenbrock
)

Arguments

x.min

the minimum value of the x-coordinate

x.max

the maximum value of the x-corrdinate

y.min

the minimum value of the y-coordinate

y.max

the maximum value of the y-corrdinate

n.points.x

the number of points to generate along the x-axis

n.points.y

the number of points to generate along the y-axis

f

a function taking a 2-dimensional vector as input and returning the z-coordinate as output

Value

a list(x, y, z, grid), where x and y are numerical vectors of x and y coordinates and z is a matrix with the z coordinate for each x-y pair and grid is a matrix with two columns and one row, one row per x-y pair


thomasWeise/aitoaEvaluate documentation built on Dec. 6, 2020, 1:22 p.m.