%
%  This routine mimicks continuous time convolution
%
 function  [y,ty] = convolve(tx,th,x,h);
%
  dtx = tx(2)-tx(1);
  dth = th(2)-th(1);
  tol = 1e-5;  % set the tolerance
  if( abs(dtx-dth)>tol) 
      fprintf(1,'ERROR!  dtx is not equal to dth \n');
      y = NaN;
      ty = NaN;
  else
      %  put your convolution code here
      
  end;