Passing arguments between fmincon iterations
Show older comments
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?
Answers (0)
Categories
Find more on Image Category Classification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!