Learn R Programming

RCEIM (version 0.2)

testFunOptimization: 1D test problem for RCEIM

Description

An one-dimension problem for testing optimization methods.

This function was created for demonstrating the RCEIM package. It has the form:

f(x) = exp(-((x - 2)^2)) + 0.9 * exp(-((x + 2)^2)) + 0.5 * sin(8*x) + 0.25 * cos(2*x)

Usage

testFunOptimization(x)

Arguments

x
The point where the function is computed.

Value

The value of the function at x.

See Also

testFunOptimization2d

Examples

Run this code
# Create a graphical representation of the problem with a line plot
dev.new()
xx <- seq(-10,10,by=0.01) 
plot(xx, testFunOptimization(xx), type="l", xlab="x", ylab="Value")
rm(list=c('xx'))

Run the code above in your browser using DataLab