function [yesORno] = isDoublePulse(signal,threshold)
%takes in a waveform and outputs 1 if it is a double pulse, 0 otherwise

aboveThresh = ( signal(:) > threshold );

[ll,~] = size(aboveThresh);

trigger = 0;
yesORno = 0;

for j=1:ll
    if ( aboveThresh(j) == 1 && trigger == 0 )
        trigger = 1;
    end
    if ( aboveThresh(j) == 0 && trigger == 1 )
        trigger = 2;
    end
    if ( aboveThresh(j) == 1 && trigger == 2 )
        yesORno = 1;
    end
end

        