function [Btime, Bvalue] = back(T, A, amin, amax, n)
  Bn = 1;
  Bt = -1;
   
  for i = 1 : length(A)

    if (T(i) > Bt && isback(A, i, amin, amax, n))
      Btime(Bn) = T(i);
      Bvalue(Bn) = A(i);
      Bn = Bn + 1;
      Bt = T(i);
    endif

  endfor

endfunction
