Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Follow up from: http://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

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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)$.

share|improve this answer
    
Thanks very much, good answer, could you explain why the shift in x means replacing x with x-a-6? –  Chimoo Mar 8 '11 at 9:24
    
@Chimoo: The graph of $y=g(x-h)$ (for some function $g$) is the same as the result of translating the graph of $y=g(x)$ by $h$ to the right. So, $x\rightarrow x-h$ is a translation by $h$ to the right, $x\rightarrow x-6$ translates $6$ to the right, moving what was happening at $-6$ to zero, then $x-6\rightarrow x-6-a$ moves another $a$ to the right, so what was happening at zero is now happening at $a$. –  Isaac Mar 8 '11 at 9:28
    
Good explanation, thanks I'll try that –  Chimoo Mar 8 '11 at 9:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.