function [edgeT] = findThresholdsSimple(signal,threshold,tvect)
    

    [size_a,size_b] = size(signal);
 
    if( (size_a>1) && (size_b>1) )
       
        error('Array is not a 1-D time series!! Cannot find max!');
        
    end
    
    size1 = size_a;
    if(size_b>size_a) 
        size1=size_b;
    end
    

     aboveThresh = ( signal(:) > threshold );
     belowThresh = ( signal(:) < threshold );
     
    newbelowThresh = zeros(size1,1);
    newbelowThresh(1)=0;
    newbelowThresh(2:size1) = belowThresh(1:(size1-1));
    
    isUpThresh = aboveThresh.*newbelowThresh;
    
     

     
     upIndices = find( isUpThresh(:) == 1 );

        edgeT = tvect(upIndices(1));

end