function retval = leastsqvec(x)
% usage:  y = leastsqvec(x)
% description: returns least squares vector
% function r(x) based on dataset in 
% parms.data and element function datafitfn

% globals
global parms;

m = parms.datasize; % get number of data rows
retval = zeros(m,1);
for ii = 1:m
  retval(ii) = feval(parms.datafn,x,parms.data(ii,:));
end;
