www.gusucode.com > globaloptim 案例源码程序 matlab代码 > globaloptim/UnconstrainedPatternSearchMinimizationExample.m
%% Unconstrained Pattern Search Minimization % Minimize an unconstrained problem using the |patternsearch| solver. %% % Create the following two-variable objective function. On your MATLAB(R) % path, save the following code to a file named |psobj.m|. % % <include>psobj.m</include> % %% % Set the objective function to |@psobj|. fun = @psobj; %% % Find the minimum, starting at the point |[0,0]|. x0 = [0,0]; x = patternsearch(fun,x0)