Next: gammainc, Previous: estimate_parameter, Up: Octave Functions and Scripts [Contents][Index]
Wrap basic functionality of Matlab’s solver fmincon to Octave’s sqp.
Non-linear constraint functions provided by fmincon’s function handle
nonlincon
are NOT processed.
Return codes are also mapped according to fmincon expected return codes.
Note: This function mimics the behaviour of fmincon only.
In order to speed up minimizing, a bounded minimization algorithm fminbnd
is used in a first try. If this fails, sqp algorithm is called.
Matlab:
A*x <= b Aeq*x = beq lb <= x <= ub
Octave:
g(x) = -Aeq*x + beq = 0 h(x) = -A*x + b >= 0 lb <= x <= ub
See the following example:
[x obj info iter] = fmincon (@(x)100*(x(2)-x(1)^2)^2 + (1-x(1))^2,[0.5,0],[1,2],1,[2,1],1) x = [0.41494,0.17011] obj = 0.34272 info = 1 iter = 6
Explanation of Input Parameters:
See also: sqp.