Rev | Line | |
---|
[37] | 1 | function H = fmincon_fun(x,params,what) |
---|
| 2 | |
---|
| 3 | xevaled = zeros(1,length(params.interfacedata.c)); |
---|
| 4 | xevaled(params.linearindicies) = x; |
---|
| 5 | |
---|
| 6 | % Experimental support for arbitrary functions |
---|
| 7 | if ~isempty(params.interfacedata.evalMap) |
---|
| 8 | for i = 1:length(params.interfacedata.evalMap) |
---|
| 9 | xevaled(params.interfacedata.evalVariables(i)) = feval( params.interfacedata.evalMap{i}.fcn,xevaled(params.interfacedata.evalMap{i}.variableIndex)); |
---|
| 10 | end |
---|
| 11 | end |
---|
| 12 | |
---|
| 13 | if nnz(params.interfacedata.c(params.nonlinearindicies)) == 0 & isempty(params.interfacedata.evalMap) |
---|
| 14 | %At most quadratic! |
---|
| 15 | H = full(2*params.interfacedata.Q(params.linearindicies,params.linearindicies)); |
---|
| 16 | else |
---|
| 17 | error('Not implemented') |
---|
| 18 | end |
---|
| 19 | |
---|
Note: See
TracBrowser
for help on using the repository browser.