01-26-2023 02:35 AM
Hey,
Can anyone explain why Locations in Peak Detector VI aren't integers?
I thought they indicated the index of peaks in the X array.
Any help would be appreciated.
Thanks,
Plu
Ps. I am using labview2015 32bits.
Solved! Go to Solution.
01-26-2023 03:45 AM
Hi Puri,
@PuriK. wrote:
I thought they indicated the index of peaks in the X array.
Whenever you "think" about a LabVIEW function you should read its help article. Did you?
The help explicitely says:
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.
So what is your question?
01-26-2023 09:33 AM
As has been said already, read the help first.
Assuming your data is an under-sampled symmetric wave, is is clear that the peaks don't align with the data points, else the two neighboring points would have the same Y. Your phase and frequency is slightly off.
It seems relatively boring to find all peaks of a regular noiseless wave. What kind of information are you actually trying to get out of your real data?
01-26-2023 07:03 PM
I really appreciate you taking the time to explain things to me. Your explanation helped me understand better. You said that the data I'm working with right now is without any noise because it was created using an oscillator. But in the future, I'll be getting data from a light sensor that will have noise in it and the measurements will be between 2.5 and 5 volts. I plan to remove any measurements that are bigger than 3 volts. Then, I want to count how many measurements are between 2.5 and 2.8 and how many are not. Unfortunately, the light sensor is still being developed, so I can't test it yet.