LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get the two values?

There are two peaks above the threshold in spectrum diagram,I want to get their coordinates,how can I?
thanks!
0 Kudos
Message 1 of 2
(2,565 Views)
LabView has a VI that does that.
From your diagram, goto the Analyze palette, then select Waveform Monitoring, then Waveform Peak Detection.vi. You specify the threshhold and width and the VI tells you how many peaks it found and their location and amplitude. If you want to see the highest two peaks, you can use the Array Max and Min function (on the Array palette) and then search the array for the next highest: use a For loop to auto-index the array, a shift register for the next highest value (initilized to 0 or some number below any of your expected values), and search for a value > prvious but < max.
0 Kudos
Message 2 of 2
(2,565 Views)