function [Btime,Bvalue] = backdelta(T, A, amin, amax, da, n)
  Bn = 1;
  Bt = -1;
   
  for i = 1 : length(A)
    if (T(i) > Bt && isbackdelta(A, i, amin, amax, da, n))
      Btime(Bn) = T(i);
      Bvalue(Bn) = A(i);
      Bn = Bn + 1;
      Bt = T(i);
    endif
  endfor


endfunction
