'Squashing' a graph of data?

393 Views Asked by At

I have a vector of sample data that describes a divergent oscillation like in this image.

Divergent Oscillation

I want to transform this data (just the data, not the system or anything), so that the data does converge to zero. I also want to keep the peaks of data at the same sample point, and the graph smooth. Simply multiplying the data by decreasing values moves the peaks of the data which is not desirable.

What sort of method should I use?

3

There are 3 best solutions below

2
On

I did not get it. Do you have a function that generates this graphic? If so, you can multiply for a positive real function (say, $e^{-\alpha x}$, where you can adjust the value of $alpha >0$ for faster zero convergence). That should do if I got your question right.

0
On

If your function is $f(x)$, try $g(x) = -\int_x^\infty f'(t) h(t)\ dt$ where $h$ is some function that is always positive but decreases rapidly enough that $\int_0^\infty |f'(t)| h(t)\ dt < \infty$.

0
On

I assume you want your data to look like the graph on the left of the $Y$-axis, where $x <= 0$

enter image description here

To do that, simply multiply each $x$ value by $-1$.

FYI: The graph below is not your your data but looks somewhat close, it is the graph of $xsin(0.025x)$.