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

6 lines
162 B
Mathematica
Raw Permalink Normal View History

2019-12-18 11:25:45 +00:00
function [f,df] = fmincon_fungp(x,prob)
z = prob.Afun*x;
w = exp(z);
f = full(log(prob.bfun'*w));
df = full(((1/(sum(prob.bfun.*w)))*(prob.bfun.*w)'*prob.Afun));