%
%  This routine mimicks continuous time convolution
%
 function  [y,ty] = convolve(t1,t2,x1,x2);
%
  dt1 = t1(2)-t1(1);
  dt2 = t2(2)-t2(1);
  tol = 1e-5;  % set the tolerance
  if( abs(dt1-dt2)>tol) 
      fprintf(1,'ERROR!  dt1 is not equal to dt2 \n');
      y = NaN;
      ty = NaN;
  else
      %  put your convolution code here
      
  end;