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!