aimfcn.m
来自「简单遗传算法matlab文件?虻ヒ糯惴╩atlab文件」· M 代码 · 共 25 行
M
25 行
function Ret=AimFcn(x)
% Camel function for test
Ret=(4-2.1*x(1)^2+x(1)^4/3)*x(1)^2+x(1)*x(2)+(-4+4*x(2)^2)*x(2)^2;
Ret=1/(Ret+500);
% -3<x<3 -2<y<2
% minmum value y=-1.031628 with its x and y are
% (-0.0898,0.7126),(0.0898,-0.7126).but its has six local minmum values
% Schaffer function for test
%Ret=0.5-((sin((x(1)^2+x(2)^2)^0.5))^2-0.5)/(1+0.001*(x(1)^2+x(2)^2)^2)^2;
%Ret=exp(2*Ret);
% -100<x,y<100
% maxnum value z=0 with its x and y are (0,0).but it has infinite minmum
% values
Ret=(3/(0.05+(x(1)*x(1)+x(2)*x(2))))*(3/(0.05+(x(1)*x(1)+x(2)*x(2))))...
+(x(1)*x(1)+x(2)*x(2))*(x(1)*x(1)+x(2)*x(2)) ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?