2
$\begingroup$

Follow up from: https://stackoverflow.com/questions/5225061/exponential-decay-surrounding-bounding-box

How can I manipulate a simple logistic function like this one:

logistic graph

So that the lower bound is at 0, and the (-3, 3) range is roughly doubled and depends on some value (the lower edge of the bounding box as described in the original question)

And then how would I flip the function horizontally, so that it can work for the upper edge of the box?

Maths n00b, sorry

1 Answers 1

5

If you take $y=\text{erf}(x)+1$, that will shift the graph up by 1, so the lower limit is 0 and the upper limit is 2. If you want to keep the upper limit at 1, taking half ($y=\frac{1}{2}(\text{erf}(x)+1)$) will return the upper limit to 1 and keep the lower limit at 0.

If you want to double the input from $(-3,3)$ to $(-6,6)$, halving $x$ will do that, $y=\frac{1}{2}(\text{erf}(\frac{1}{2}x)+1)$. If you then want to move it so that what was at $-6$ is now at $a$, use $y=\frac{1}{2}(\text{erf}(\frac{1}{2}(x-a-6))+1)$. To flip it horizontally, take the opposite of $x$, $y=\frac{1}{2}(\text{erf}(-\frac{1}{2}x)+1)$.

  • 0
    Good explanation, thanks I'll try that2011-03-08