|
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!
|