Passing arguments between fmincon iterations

I have an expensive function
function y = g(x)
x_help=x;
z_x = compute_help_variable(x, x_help);
y = h(z_x)
end
z_x is a vector, h(z_x) is a scalar.
fmincon will compute g(x0) in a first step and g(x1) in a second step. However, computation of g(x1) would be much faster if I could compute z_x1 = compute_help_variable(x1, z_x0). This means, in the second call of the objective function, I would like to use an intermediate result of the first call. Is there any way to realize this?

回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

标签

提问:

2016-12-9

编辑:

2016-12-9

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by