03-12-2019 03:57 AM
I got a peak in the left signal and use this index to get a value in the right signal. these two signals should be synchronous, the red dot in the right picture suppose to be the peak value, but is always delay more data point. I would like to subtract some index value to eliminate the delay, but the location for the peak is not an integer, so how can I find a value near this peak index? I subtract an integer and I get an amplitude of zero.
And I use the peak detector, but this vi no always able to find the peak value, like the green dot in the right picture is the peak detected, but no the max value.
Thanks!
Liang
Solved! Go to Solution.
03-12-2019 06:35 AM
Upload the VI.
03-12-2019 06:41 AM
Instead of using Index Array, use Interpolate 1D Array. This function will accept a fractional index and interpolate what the value should be.
03-12-2019 08:13 AM
Thank you! That's a good idea. And could you tell me why the peak detector sometimes miss the max value? like the green dot in the right picture?
03-12-2019 09:17 AM
If you want us to critically examine and inspect your code, you need to give it to us in the clearest way possible, which is as a VI, not a tiny blurry picture of part of the VI.
Bob Schor
03-12-2019 08:56 PM
Sure, why the peak is not always the max amplitude?
Thank you!
03-12-2019 09:59 PM
You also need to include some typical data.
Most of your code makes no sense at all. Why don't you use the "amplitudes" output of the peak finder?
03-12-2019 10:29 PM
Yes, I should, is this the reason why sometimes the peak value is not the maximum amplitude? And I still need to index another synchronize signal to get the corresponding value, I tried to use interpolate 1 d array, but I didn't get the value on the signal, but at the bottom.
03-12-2019 10:33 PM
Sorry, I tried the interpolate a 1D array, but the value is not on the signal. The red dot in the right picture is the outcome of interpolate 1 d array, should it be around the peak?