Hello,
I'm trying to implement a "find peak" function for a spectral graph where a cursor would automatically move to the x-axis location that has the highest y-value. I've attached my simple code routine that does this. It kinda works -- when I'm fully zoomed out on the x-axis (i.e. autoscale), and I engage this function, the cursor seems to miss the peak by a couple of samples. However, if I'm zoomed in on the graph around the peak, and I engage the function, it seems to snap to the correct value.
Just wondering how the axis scaling relates to the cursor x-y position?
Regards
-Ted