366 Nonlinear Programming II: Unconstrained Optimization Techniques
SOLUTION
Step 1: Write an M-fileobjfun.m for the objective function.
function f= objfun (x)
f= 100* (x(2)-x(1) *x(1))^2+(1-x(1))^2;
Step 2: Invoke unconstrained optimization program (write this in new MATLAB file).
clc
clear all
warning off
x0 = [-1.2,1.0]; % Starting guess
fprintf ('The values of function value at starting
pointn');
f=objfun(x0)
options = optimset('LargeScale', 'off');
[x, fval] = fminunc (@objfun,x0,options)
This produces the solution or ouput as follows:
The values of function value at starting point
f=
24.2000
Optimization terminated: relative infinity-norm of gradi-
ent less than options.TolFun.
x=
1.0000 1.0000
fval=
2.8336e-011
References and Bibliography
6.1 S. S. Rao,The Finite Element Method in Engineering, 4th ed., Elsevier Butterworth
Heinemann, Burlington, MA, 2005.
6.2 T. F. Edgar and D. M. Himmelblau,Optimization of Chemical Processes, McGraw-Hill,
New York, 1988.
6.3 R. L. Fox,Optimization Methods for Engineering Design, Addison-Wesley, Reading, MA,
1971.
6.4 W. E. Biles and J. J. Swain,Optimization and Industrial Experimentation, Wiley, New
York, 1980.
6.5 C. R. Hicks,Fundamental Concepts in the Design of Experiments, Saunders College
Publishing, Fort Worth, TX, 1993.
6.6 R. Hooke and T. A. Jeeves, Direct search solution of numerical and statistical problems,
Journal of the ACM, Vol. 8, No. 2, pp. 212–229, 1961.
6.7 M.J.D. Powell, An efficient method for finding the minimum of a function of several
variables without calculating derivatives,Computer Journal, Vol. 7, No. 4, pp. 303–307,
1964.