# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Resample a waveform to less data points using the averaged value

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.

Message 1 of 7
(6,658 Views)

## Re: Resample a waveform to less data points using the averaged value

Check out the Decimate (continuous) VI in the Signal Processing Palette.
Message 2 of 7
(6,651 Views)

## Re: Resample a waveform to less data points using the averaged value

Thanks! That's exactly what I'm looking for. But the output is array type. A conversion to waveform type is still needed.
Message 3 of 7
(6,643 Views)
Solution
Accepted by T.H.USTM

## Re: Resample a waveform to less data points using the averaged value

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
(6,641 Views)

## Re: Resample a waveform to less data points using the averaged value

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.

Message 5 of 7
(6,120 Views)

## Re: Resample a waveform to less data points using the averaged value

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?

Message 6 of 7
(6,108 Views)

## Re: Resample a waveform to less data points using the averaged value

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.

Message 7 of 7
(2,342 Views)