function showfmin ( )
%
%% showfmin() illustrates fmin.

  fprintf ( 1, '\n' );
  fprintf ( 1, 'showfmin():\n' );

clc
tol = .000001;
disp('Local minima of the Mercury-Earth separation function.')
disp(sprintf('\ntol = %8.3e\n\n',tol))
disp(' Initial Interval     tmin        f(tmin)    f evals')
disp('----------------------------------------------------')
options = optimset ( 'TolX', tol );
%options = zeros(18,1);
for k=1:8
   L = 100+(k-1)*112;
   R = L+112;
%  options(2) = tol;
   [ tmin, fval, exitflag ] = fminbnd ( 'DistMercEarth', L, R, options );
%  [tmin options] = FMIN ( 'DistMercEarth', L, R, options );
%  minfeval = options(8);
%  nfevals = options(10);
   disp(sprintf('     [%3.0f,%3.0f]     %10.5f   %10.5f',L,R,tmin,fval))
end

  return
end

