
%
%       springss
%

  function ss = hivss2(params,data)

  global m k

  t = data.xdata;
  ydata = data.ydata;

  c = params;

  num = sqrt(4*m*k - c^2);
  den = 2*m;
  y = 2*exp((-c/den)*t).*cos((num/den)*t);

  Res = y - ydata;
  ss = Res*Res';

