powered by
$ 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
data(fourpeaks) d <- fourpeaks() d <- fourpeaks(2000) d <- fourpeaks(N=2000, phi=pi/4)
Run the code above in your browser using DataLab