function [t0] = ATtiming(y, t, threshold);
% function [t0] = ATtiming(y, t, threshold)
%
% finds the position of the first pulse using absolute threshold procedure.
%
% <y> is the given signal in 1D array format.
% <t> is time axis in 1D array format.
% <threshold> is the level of threshold.
% <t0> is time of the pulse.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Current state of the project and change history.
%
%	Created by:	Alexander Vostrikov
%	Created on:	07/12/2011
%
%	Version: 1.0
%	Modified by:	Alexander Vostrikov
%	Edited on:	07/12/2011
%
% List of Previous Versions:
%
%
% If you type 'help ATtiming' on the Matlab command window, you will be
% able to see this help documentation.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% beginning of code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

t0 = t(find(y > threshold)(1));

end

