function [index] = SignificanceCut(s, cut);
% function [index] = SignificanceCut(s, cut)
%
% returns the index when the ratio signal over sigma becomes greater or equal
% to certain value.
%
% <s> is the given significance function in 1D array format.
% <cut> is the cut value for the significance.
% <index> is index of the element when the ratio is greater or equal to the <cut>.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Current state of the project and change history.
%
%	Created by:	Alexander Vostrikov
%	Created on:	07/12/2011
%
%	Version: 1.1
%	Modified by:	Alexander Vostrikov
%	Edited on:	07/13/2011
%	 (a)	Significance function is an input parameter.
%	 (b)	Separate function for significance function calculation created. It is
%		supposed to be used in analysis, but primatives, for faster calculation.
%
% List of Previous Versions:
%
%	Version: 1.0
%	Modified by:	Alexander Vostrikov
%	Edited on:	07/12/2011
%	 (a)	Significance function is calculated.
%
% If you type 'help SignificanceCut' on the Matlab command window, you will be
% able to see this help documentation.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% beginning of code %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

index = find(s >= cut)(1);

end

