function f = expf (ab)
%EXPF      Exponential fit internal function.
%          Used by EXPFIT.

% Copyright (c) 1994 by Bogdan R. Kosanovic
% University of Pittsburgh, PA, USA

% History: 07-Apr-94 Created

global EXPFIT_x
global EXPFIT_y   % actual data

yhat = ab(1) * exp(ab(2) * EXPFIT_x);
err = EXPFIT_y - yhat;
f = sum(err.^2);
