Interpolate Data and error

I have a wave with a number of points, for example 1024. (original_wave)
I would interpolate my wave creating a new wave with a minor number of points, for example 16. (interpolate_wave)
For this issue, I use "Interpolate" function with "Linear" as "Interpolation type".
Furthermore, I would create a wave with the error (or weight) associated to each point of the "interpolate_wave", for example the standard deviation of the (1024/16=64) 64 points used for interpolate each point of the "interpolate_wave".
thanks
In order to better explain my request, I create a igor file with a graph.
For example I create synthetic data (wave X and waveY), red line represents my original data.
I would create a macro/procedure that make what I realized manually in the graph.
Blue markers are the interpolate data of waveX and wave Y (each marker is the mean value of each subrange of original data, X and Y, respectively), and the associated errors are the standard deviation of each subrange (X and Y, respectively).
Thanks for your help
Open the Procedure window (Windows->Procedure Windows->Procedure Window) and add this line near the top:
#include <Decimation>
Close the Procedure window. Now you will find an item "Decimate" in the Analysis menu. Selecting that item will put up a simple dialog to choose a wave to decimate, along with choices for generating error waves. You will need to separately decimate your X and Y waves.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com