Nonuniform sampling points based on the first order derivative of signal amplitude
A method that I use very often to approximate the CDF is based on the observation that given a set of $N$ samples, the CDF at the point x the fraction of the points that are smaller than $x$. So if have a vector of sorted samples $S$ you could approximate the CDF as $cdf(x) = i/N$ if $S_{i-1} &lt; x &lt; S_i$.
A simple way to plot the CDF would be
plot(sort(S), (1:N)/N)
Then you can approximate the derivative by a difference equation. You could use a binary search to find the region of the vector $S$ where $x$ lies, say $idx(S, x)$, then you could compute something like
$i_1 = idx(S, x - \Delta)$, $i_2 = idx(S, s + \Delta)$ and use $(N \cdot (S_{i_2+1} - S_{i_1})) / (i_2 - i_1 + 1)$.
A different way to choose the anchor points would be, let $i = idx(S, x)$ and compute $(N \cdot (S_{i+k} - S_{i-k})) / (2k+1)$
And you can fit use a polynomial fit if you need a better accuracy where the CDF derivatives varies rapidly.