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 ExchangeSystems 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