LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resample a waveform to less data points using the averaged value

Solved!
Go to solution

Hello,

 

I'm trying to resample a large waveform to a  smaller waveform. I want to use the mean value of all the data points within a time interval of the original waveform as the new value of the new waveform. For example I want to resample a waveform with 100k points to a waveform with 1k points, in the new waveform the value of each data point is the average of 100 data points in the old waveform. Is there any convenient way to do this in labview? The Resample Waveforms VI seems only provide the coerce/linear/spline/FIR interpolation modes. Thank you very much for your help.  

0 Kudos
Message 1 of 7
(5,417 Views)
Check out the Decimate (continuous) VI in the Signal Processing Palette.
Message 2 of 7
(5,410 Views)
Thanks! That's exactly what I'm looking for. But the output is array type. A conversion to waveform type is still needed. 
0 Kudos
Message 3 of 7
(5,402 Views)
Solution
Accepted by topic author T.H.USTM
Just use Build Waveform, Y is your decimated array, dt is scaled by the decimation factor and t0 can remain the same.
Message 4 of 7
(5,400 Views)

Morning,

 

I'd like to do the same thing but with a non-decimal value. So I've got x number of data points in a set that I'd like to resample to a size of 100 data points.

 

As far as I can see all these types of functions use factors of 10.

0 Kudos
Message 5 of 7
(4,879 Views)

Ok, I've found the rational re-sample.

 

Next question! Is there a LabVIEW alternative to MS Excel's goal seek algorithm? So I can adjust the ML coefficients to physically sensible values to produce an array length of 100?

 

 

0 Kudos
Message 6 of 7
(4,867 Views)

Yes as you said the best option is to use the rational resample, here you have an example how to use it:
input array +200k samples, re-sample goal 65k to load it into arb waveform generator.
Rational_Resample.PNG

0 Kudos
Message 7 of 7
(1,101 Views)