Code covered by the BSD License  

Highlights from
INTSOLVER: An interval based solver for Global Optimization

from INTSOLVER: An interval based solver for Global Optimization by Tiago Montanher
Interval based functions to solve small global optimization problems with guaranteed bounds.

evrastrigin(x)
function y = evrastrigin(x)
% Name: Rastrigin
% Reference: 
% Global Optimization. Törn A., Žilinskas A., 1989. Lecture Notes in 
% Computer Science. vol 350 (Springer, Berlin)
% Variables: n
% Initial Point/ Initial Interval: (-5,...,-5) / ([-5.12, 5.12],...,[-5.12, 5.12])
% Reported Solution: (0,...,0)
% Minima: 0
% Matlab Code by A. Hedar (Nov. 23, 2005).
 
n = length(x); 
s = 0;
for j = 1:n
    s = s+(x(j)^2-10*cos(2*pi*x(j))); 
end
y = 10*n+s;
end

Contact us at files@mathworks.com