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.
Solved! Go to Solution.
Upload the VI.
Instead of using Index Array, use Interpolate 1D Array. This function will accept a fractional index and interpolate what the value should be.
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?
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.
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.
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?