www.gusucode.com > globaloptim 案例源码程序 matlab代码 > globaloptim/MinimizeAFunctionWithManyLocalMinimaExample.m

    %% Minimize a Function with Many Local Minima
% Minimize De Jong's fifth function, a two-dimensional function with many
% local minima.
%%
% Plot De Jong's fifth function.

% Copyright 2015 The MathWorks, Inc.

dejong5fcn
%%
% Minimize De Jong's fifth function using |simulannealbnd| starting from
% the point |[0,0]|.
fun = @dejong5fcn;
x0 = [0 0];
x = simulannealbnd(fun,x0)
%%
% The |simulannealbnd| algorithm uses the MATLAB(R) random number stream,
% so you might obtain a different result.