11 lines
177 B
Mathematica
11 lines
177 B
Mathematica
|
|
function H = penlab_callback_dff(x,model)
|
||
|
|
|
||
|
|
global latest_x_f
|
||
|
|
global latest_df
|
||
|
|
|
||
|
|
x = x(:);
|
||
|
|
if isequal(x,latest_x_f)
|
||
|
|
df = latest_df;
|
||
|
|
else
|
||
|
|
[f,df] = fmincon_fun(x,model);
|
||
|
|
end
|