LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

want to find peak and valley in a graph, but, only peak can be found, please help

Hi,

attached is the program and data. The peak can be detected, but, the valley cannot be found, what is wrong, please help

Download All
0 Kudos
Message 1 of 3
(2,755 Views)

It (almost) always helps to read the "Help" for LabVIEW functions.  This is from the Help for Peak Detector:  "threshold instructs the VI to ignore peaks and valleys that are too small. The VI ignores peaks if the fitted amplitude is less than threshold. The VI ignores valleys if the fitted trough is greater than threshold."

 

You used a threshold of 0.005.  All of your valleys are >0.005.  Hence, as documented, "The VI ignores valleys if the fitted trough (approximatly 2.4) is greater than threshhold (0.005)".

 

Try using a threshold of 2.5.  You will get 5 peaks and 5 valleys.  Alternatively, zero-mean your function and use a threshold of 0.005.

 

Bob Schor

 

 

0 Kudos
Message 2 of 3
(2,746 Views)

thanks, your advice is valuable

0 Kudos
Message 3 of 3
(2,727 Views)