Thread Subject: How to detect pulse signal overlap?

Subject: How to detect pulse signal overlap?

From: Wes

Date: 21 Oct, 2009 00:22:04

Message: 1 of 5

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

Subject: How to detect pulse signal overlap?

From: ImageAnalyst

Date: 21 Oct, 2009 02:14:52

Message: 2 of 5

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););

Subject: How to detect pulse signal overlap?

From: Wes

Date: 21 Oct, 2009 11:37:05

Message: 3 of 5

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <4455e2d5-5f9f-4d01-8980-1348163c8d0c@a6g2000vbp.googlegroups.com>...
> 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););

Sorry that I oversimplified my example. What if the first column data between channel A and channel B are not same? For example, if pulseB(:,1) = [0 0.9 1 2.2 3 7 7.1 7.2 8 9 9.5]. Thanks again!

Subject: How to detect pulse signal overlap?

From: Lars

Date: 21 Oct, 2009 14:08:19

Message: 4 of 5

how about something like

% pseudocode

find(a) && find(b)

% or

a(a~=0) && b(b~=0)

you can see it as a modified form of a phase locked loops phase diskriminator

Lars

Subject: How to detect pulse signal overlap?

From: ImageAnalyst

Date: 21 Oct, 2009 17:35:18

Message: 5 of 5

Maybe you should first use interp1() to get a common x axis.
Otherwise, being digital there's no certain way to tell overlap unless
you make assumptions. For example if A=5 and 1 and 5 at 2, while B =
5 at 0.9 and still 5 at 2.1, can you say that B = 5 at 1 and 2? No,
you can't because you don't have B measured at those locations. You
can make some guess at what B would be there (for example using
interp1) and then you can make the comparison. Also, what does
overlap mean? Do they need to have the same Y value? What if, at a
particular X, A equaled 5 and B equaled 4. Is that an overlap
condition?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
overlap Wes 20 Oct, 2009 20:24:05
pulse Wes 20 Oct, 2009 20:24:05
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com