LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

finding peaks

Hello all,

I wrote a vi. that takes a sine wave and finds each of the peaks. I require an 1D output waveform that consists of 0's everwhere but at the peaks. I need this waveform to act as a comb function so I can multiply it by my actual frequency domain signal. The vi I have attached finds the peaks but outputs a two-dimensional wave(10x1000). I require the peaks in the same position but in a 1D array(1x1000). Any thoughts?

Azazel
Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 1 of 2
(2,199 Views)
Using that peak detector is gonna be a little tricky for what you want to do since the peaks it returns are based upon an interpolated signal and therefore the "locations" array doesn't neccessarily correspond to actual points in your data (i.e. the location indicies are not integers). You could definitely work something out, but an easier solution is to use the point by point version of the same peak detector VI. Here's an example (LV 7.0).

Regards,
Ryan K.
0 Kudos
Message 2 of 2
(2,180 Views)