pennonm_callback_f.m
来自「matlab波形优化算法经常要用到的matlab toolbox工具箱:yalm」· M 代码 · 共 17 行
M
17 行
function f = ipopt_callback_f(x,model_in)
global latest_x
global latest_df
persistent model
if nargin>1
model = model_in;
return
end
% We compute both function value and gradient. If pennon calls later to get
% gradient, we have saved in a global variable (yea, I know, globals suck)
x = x(:);
[f,latest_df] = fmincon_fun(x,model);
latest_x = x;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?