View source: R/test_func_apply.R
test_func_applyMO | R Documentation |
General function for evaluating a test function with multivariate output
test_func_applyMO(
func,
x,
numoutdim,
scale_it,
scale_low,
scale_high,
noise = 0,
...
)
func |
A function to evaluate |
x |
Input value, either a matrix whose rows are points or a vector for a single point. Be careful with 1-D functions. |
numoutdim |
Number of output dimensions |
scale_it |
Should the data be scaled from [0, 1]^D to [scale_low, scale_high]? This means the input data is confined to be in [0, 1]^D, but the function isn't. |
scale_low |
Lower bound for each variable |
scale_high |
Upper bound for each variable |
noise |
If white noise should be added, specify the standard deviation for normal noise |
... |
Additional parameters for func |
Function values at x
x <- matrix(seq(0,1,length.out=10), ncol=1)
y <- test_func_apply(sin, x, TRUE, 0, 2*pi, .05)
plot(x,y)
curve(sin(2*pi*x), col=2, add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.