I'm searching for an algorithm for resizing a RF sampled signal in order to draw it without losing any important maximum or minimum values.
The values of the vector are negative/positive around zero.
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
Probably not what you want, but using the convex hull of your points will preserve the minima and maxima.
R Code Below
#31780 T <- 1000 x <- rnorm(T,0,1) ix <- seq(1,T) ix_hpts <- chull(x = ix, y= x) plot(ix_hpts, x[ix_hpts], type='l', col='red') points(ix, x)
Just find the maximum and minimum value of your data; find the
absmax:= max(abs(min(data),max(data))). Scale your values by
The y-coordinate of your data point will by
y:= value * factor + height / 2 to keep the x=0 line centered in your drawing.
That's pretty basic (read: ninth grade) solving of linear equations...