psobjective.m

来自「遗传算法工具包」· M 代码 · 共 15 行

M
15
字号
%% Coding and minimizing an objective function using Pattern Search
% This is a demonstration of how to create and minimize an objective
% function using Pattern Search in the Genetic Algorithm and Direct Search
% Toolbox.

%   Copyright 2004 The MathWorks, Inc. 
%   $Revision: 1.1.4.2 $  $Date: 2004/04/04 03:24:40 $

%% A simple objective function
% Here we want to minimize a simple function of two variables
%
%     min f(x) = (4 - 2.1*x1^2 + x1^4/3)*x1^2 + x1*x2 + (-4 + 4*x2^2)*x2^2;
%      x
% The above function is known as 'cam' as described in L.C.W. Dixon and
% G.P. Szeg

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?