Average waves with different x-axis

Hi,
I hope this has not been here before, but I would really love to have an easy possibility to take the average of two waves with different x-axis.
I am measuring values at different time points - and the position and distance of these time points is varying, e.g. my x-data for series 1 is like (0.1, 0.25, 0.3, 0.4, 0.62, ...) and for series 2 like (0.0, 0.2, 0.42, 0.5, 0.7, ...). This is easy to do in Origin (extrapolating the points on a calculated, equidistant x scale), but simple averaging will fail due to the different (and not even constant spacing of the points.
Or is there a Code Snippet around I might have overseen?
Best regards,
Volker
You might want to start with the interpolate2 operation to establish a common x axis. Then you could average the waves with
wAvg[] = (w1[p] + w2[p]) / 2