From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PeakDetector output arrays

PeakDetector function search an input array for peaks (or valleys) and returns 3 arrays

  • peakLocations
  • peakAmplitudes
  • peakSecondDerivatives

How are the peaks listed?

I mean: I think that every peak has the same position in all the 3 output arrays:

  • peak #1 - peakLocations[0], peakAmplitudes[0], peakSecondDerivatives[0]
  • peak #2 - peakLocations[1], peakAmplitudes[1], peakSecondDerivatives[1]
  • ...

but how are the peaks listed?

Ordered by increasing peakLocations?

Ordered by increasing or decreasing peakAmplitudes?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 4
(3,817 Views)

Could someone help with this question, please?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 2 of 4
(3,741 Views)

Hi vix,

 

because of some limitations in the functionality (see here) I ended up with writing my own function... and as you can see from my linked post my tests date back six years, so I forgot the details you are asking for...

Message 3 of 4
(3,737 Views)

Hi Wolfgang,

looking at your post I see you've been using ThresholdPeakDetector() - I didn't know this function exists.

On the other side, I've been using PeakDetector()

 

I don't know if the two functions behave somehow differently or if CVI2010 SP1 fixed the bug you found, but until now I haven't find any problem with PeakDetector().

Anyway, thanks to your suggestion I'll look deeper to avoid potential problems

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 4 of 4
(3,729 Views)