function M = Lintersect(A,B)
% M = Lintersect(A,B)
%
% Input Variables
%   A - First Signal
%   B - Second Signal

% Output Variables
%   M- The set of intersection points
%
% Description
%   Determine the intersections of two signals

% Created
%   8/23/2006, Mohamed A Mneimneh, Marquette University
% This software is released under the terms of the GNU General
% Public License (http://www.gnu.org/copyleft/gpl.html).

X = 0;
count = 1;

   

Dif = A-B;

for i = 1:length(Dif)
    if (abs(Dif(i)) < 0.05 &&  abs(Dif(i)) > 1e-4)

        
        X(count) = i;
        count = count + 1;
    end
end
M = remove_rep(Dif,X);