LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

total number of peaks in a signal

Hi Henrik_Volkers

Thanks for your instant reply and by the by, that's not my homework. I've been working on this for more than a month trying my own solutions.

 

I thought I can get the total number of peaks without using any formulas (MATLAB script), but I have a problem in solving it. 

 

So please excuse me if there is any trouble. 

 

 

 

0 Kudos
Message 11 of 14
(471 Views)

I have attached a VI and an acquired signal.

 

If the value of N=13, then I get No. of peks is 72, increasing N gives higher value of peaks.

Kindly let me know how to adjust the value of "N" for "FOR LOOP" in order to get the number of peaks.

 

 Thanks in advance.

 

Good Day Smiley Happy

Download All
0 Kudos
Message 12 of 14
(465 Views)

@SAIbme wrote:

Hi @1984,

Thanks for your reply.

Kindly be more specific about implementing the equation which you have suggested " speaking x(i) is a peak IF (x(i-1)<x(i)) AND (x(i+1)=<x(i))" .

Can it be implemented using MATLAB script?

 

Please suggest me an idea for it.

 

Good Day Smiley Happy 


 

Hi SAIbme,

 

looks like (discrete) calculus to me:

 

if the first derivate f'(x) of your input signal f(x) changes it's signum as described by 1984, this change indicates a peak.

 

In the following example the peak would be indicated at x = 25

 

2013-05-27_first derivate.png

 

 


see also: https://forums.ni.com/t5/LabVIEW/Detecting-peaks-in-blood-pressure-waveform/m-p/2419090#M746711

 

 

 

 

Alex

0 Kudos
Message 13 of 14
(451 Views)

Hi friends,

 

I would like to thank 1984NapDynamiteHenrik_Volkersalexderjuengere

 

For their replies and suggestions.

 

Finally, I've got the correct output.

Thank you friends once again.

 

Good Day Smiley Happy 

 

0 Kudos
Message 14 of 14
(419 Views)