function pwrplot(XP,dfmin,dfmax,fsmp)
  % Plots a power spectrum {XP} in the range {dfmin.dfmax}
  % of discrete frequencies, with the 
  % true frequency (in Hz) on the horiz axis.
  %
  % Assumes that the number of original samples is even
  % and that the sampling frequency is {fsmp} (in Hz).
  assert(size(XP,2) == 1)
  NP = size(XP,1);
  assert((0 <= dfmin) && (dfmin < dfmax) && (dfmax <= NP-1))
  N = 2*(NP-1); % Assuming {N} is even.
  F = (dfmin:dfmax)*fsmp/N;
  assert(size(F',1) == dfmax-dfmin+1)
  plot(F',XP(dfmin+1:dfmax+1,1))
  