% Numerical Mathematics and Computing, Fifth Edition
% Ward Cheney & David Kincaid
% Brooks/Cole Publ. Co.
% (c) 2003
%
% file: fmin2.m
%
% Find local minimum values for the function
% myfcn(x) = x^2 + sin(53x) on the intervla [-2 , 2]:
%
myfcn2 = inline('x^2 + sin(53*x)')
[xmin ymin] = fminsearch( myfcn2, [0.0])
[xmin ymin] = fminbnd(myfcn2, -0.5, 0.5)
fplot(myfcn2, [-2,2])
title('F(x) = x^2 + sin(53x)')
xlabel('x axis')
ylabel('y axis')

