LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

windowing a signal

I am working on a signal, as a part of this work I want to detect signal peaks within a window of length 512 samples (the original signal is about 30000).
How could I accomplish this windowing of the main signal such that at first I take only the first 512 samples then after detection I take the next 512 samples and so on untill the end of the signal.
I am new to labview, so multi answers with example code is highly appreciated.
Thanks in advance
0 Kudos
Message 1 of 3
(2,705 Views)
Here is a sample program in 6.0 format. It creates a 2D array of 'NaN' with 30,000 datapoints in two rows. The first row is used for the max point graph and is put into row 0 so it is on top of the other data. The first for loop creates the random data and replaces the entire second row. The second for loop checks each window and finds the max point. It then replaces the individual 'NAN' point in the first row with the acual max value.
0 Kudos
Message 2 of 3
(2,705 Views)
Another option is to use the array functions. Use the "Array Subset" function to get the subarray from element 0 to element 511. Then, use the "Array Max and Min" function to determine the maximum value in this "window." Go through the entire 30,000 element array, looking at a 512 section at a time.
0 Kudos
Message 3 of 3
(2,705 Views)