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 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!