08-22-2008 03:10 PM
Does anyone know why the waveform peak detect function provides accurately the position of the peaks but not the value?
I have been looking at my data at the position indicated by the function as a peak, and it is correct at that place the wave has its peak, but the value provided by the function is higher than the actual value at that point.
08-22-2008 03:20 PM
The help makes it clear that the VI will make a quadratic fit to the data, so the locations are not integers (i.e. not aligned with you exact data). From that analysis, the peak is between two of your points, and slightly above the neighboring data.
See the coercion dot. Make the "locations" array DBL (Why did you change it to I64, that makes no sense at all!)
Quote from the help:
"Locations contains the index locations of all peaks or valleys detected in the current block of data. Because the peak detection algorithm uses a quadratic fit to find the peaks, it actually interpolates between the data points. Therefore, the indexes are not integers. In other words, the peaks found are not necessarily actual points in the input data but may be at fractions of an index and at amplitudes not found in the input array."
All clear? 😄
08-22-2008 03:34 PM