Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!a6g2000vbp.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to detect pulse signal overlap?
Date: Tue, 20 Oct 2009 19:14:52 -0700 (PDT)
Organization: http://groups.google.com
Lines: 20
Message-ID: <4455e2d5-5f9f-4d01-8980-1348163c8d0c@a6g2000vbp.googlegroups.com>
References: <hblk7b$1r3$1@fred.mathworks.com>
NNTP-Posting-Host: 75.186.70.56
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256091292 32444 127.0.0.1 (21 Oct 2009 02:14:52 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 21 Oct 2009 02:14:52 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a6g2000vbp.googlegroups.com; posting-host=75.186.70.56; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	GTB6; CyberSafe-IWA-Enable; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 
	3.0.04506.648; .NET CLR 3.5.21022; AskTB5.5),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:578847


On Oct 20, 8:22 pm, "Wes" <wspar...@hotmail.com> wrote:
> I have each huge square pulse signal data from two channels.  In the following oversimplified example, how can I detect which pulse events are overlapped between channel A and channel B?
>
> % column 1 is time; column 2 is volt
> pulseA(:,1) = [0:10];
> pulseA(:,2) = [0 0 5 5 0 0 0 0 0 0 0];
> pulseB(:,1) = [0:10];
> pulseB(:,2) = [0 5 5 5 5 0 0 5 5 0 0];
> plot(pulseA(:,1),pulseA(:,2),'b')
> hold on
> plot(pulseB(:,1),pulseB(:,2),':r')
>
> Thanks

-----------------------------------------------------------------------
As long as the first columns refer to the same x coordinates you can
do this:
overlap = (pulseA(:,2) == pulseB(:, 2););