Page 506 - Applied Numerical Methods Using MATLAB
P. 506
MATLAB 495
If you use the MATLAB of version 5.x, you can refer to the usage of the
constrained minimization routine ‘constr()’, which is summarized in the box
below.
USAGE OF THE MATLAB 5.X BUILT-IN FUNCTION “CONSTR()”
FOR CONSTRAINED OPTIMIZATION
[x,options] = constr(’ftn’,x0,options,l,u)
ž Input arguments (only ‘ftn’and x0 required, the others optional)
‘ftn’ : usually defined in an m-file and should return two output
arguments, one of which is a scalar value (f(x))ofthe
function (ftn) to be minimized and the other is a vector
(g(x)) of constraints such that g(x) ≤ 0.
x0 : the initial guess of solution
options: is used for setting the termination tolerance on x,f(x),and
constraint violation through options(2)/(3)/(4), the number of
the (leading) equality constraints among g(x) ≤ 0 through
options (13), etc.
(For more details, type ‘help foptions’ into the MATLAB
command window)
l,u : lower/upper bound vectors such that l ≤ x ≤ u.
ž Output arguments
x : minimum point reached in the permissible region satisfying
the constraints.
options: outputs some information about the search process and the
result like the function value at the minimum point (x)
reached through options (8).

