function timeplot(x,imin,imax,fsmp,fmt)
  % Plots a signal, with format {fmt} and 
  % true time (in seconds) on the horiz axis.
  % Assumes that the sampling frequency is {fsmp} (in Hz).
  assert(size(x,2) == 1)
  T = (imin-1:imax-1)/fsmp;
  assert(size(T',1) == imax-imin+1)
  plot(T',x(imin:imax,1),fmt)
  