f(x) = 4*(1-x(1)).^2 .* exp(-x(1).^2 - (x(2)+1).^2) - ...
10*(x(1)/3 - x(1).^3 - x(2).^5 ) .* exp(-x(1).^2 - x(2).^2) - ...
(1/2) .* exp(-(x(1)+1).^2 - x(2).^2)
where -5 <= x(1) <= 5 , -3 <= x(2) <= 3
我想确定使用最陡下降最大化x*
的最佳f(x)
。
我发现了http://www4.ncsu.edu/~ctk/darts/steep.m,但我无法使用它。
我不明白这部分评论:
% f = objective function,
% the calling sequence for f should be
% [fout,gout]=f(x) where fout=f(x) is a scalar
% and gout = grad f(x) is a COLUMN vector
答案 0 :(得分:1)
x0
输入。