Digital RF signal vector resize algorithm
Probably not what you want, but using the convex hull of your points will preserve the minima and maxima.





R Code Below

#31780
T &lt;- 1000
x &lt;- rnorm(T,0,1)

ix &lt;- seq(1,T)

ix_hpts &lt;- chull(x = ix, y= x)

plot(ix_hpts, x[ix_hpts], type='l', col='red')
points(ix, x)