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

% globals
global parms;

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