Learn R Programming

msr (version 0.4.4)

fourpeaks: Fourpeaks Function

Description

Fourpeaks is a two-dimensional, additively separable function of four Gaussian peaks

$ f(x) = \frac{1}{2} \bigl ( e^{ -(x_1 - \frac{1}{4})^2 / 0.3^2 } + e^{ -(x_2 - \frac{1}{4})^2 / 0.3^2} + e^{ -(x[, 1] - \frac{3}{4})^2 / 0.1^2 } + e^{ -(x_2 - \frac{3}{4})^2 /0.1^2} \bigr ). $

On $[0,1]^2$ the function has 4 maxima and 9 minima

Arguments

Value

returns N samples form the fourpeaks function

Examples

Run this code
data(fourpeaks)

d <- fourpeaks()

d <- fourpeaks(2000)

d <- fourpeaks(N=2000, phi=pi/4)

Run the code above in your browser using DataLab