Dynamic-Calibration/utils/YALMIP-master/extras/penlab_callback_df.m

12 lines
197 B
Mathematica
Raw Permalink Normal View History

2019-12-18 11:25:45 +00:00
function [df,model] = penlab_callback_df(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
df = df(:);