File:Rastrigin function.png
Summary
| Description |
English: Rastrigin Function |
| Date | |
| Source | Own work |
| Author | Diegotorquemada |
| PNG development |
Source code
x = linspace(-5.12,5.12,200);
y = linspace(-5.12,5.12,200);
f = @(x,y) 10*2 + x.^2 + y.^2 - 10*cos(2*pi*x) - 10*cos(2*pi*y);
[xx,yy] = meshgrid(x,y);
zz = reshape(f(xx(:),yy(:)), 200, 200);
figure
surfc(xx,yy,zz);
shading interp;
title('Rastrigin function','FontSize',16)
axis([-5.12 5.12 -5.12 5.12 -30 85])
Licensing
| I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |