# Mathematica animation errors [closed]

Can someone please explain this to me? I made these function animations with my professor and they were working in his office but when he emailed them to me the animation windows showed up blank and there was an error in the second animation. Can someone explain why this may be happening?

f[x_, t_, m_, n_, r_, A_] := 1 - m/(1 + Exp[-n (x + r*t)]) + A
Plot[f[x, 0, 4, 2, 1, 4], {x, -5, 5}, PlotRange -> {0, 6}]

Animate[Plot[f[x, t, 4, 2, 1, 4], {x, -5, 5}, PlotRange -> {0, 6}], {t, 0, 2}]

data = NDSolve[{D[u[t, x], t] == 0.2*u[t, x]*(f[x, t, 4, 2, 1, 4] - u[t, x]),
u[0, x] == 1 - 1/(1 + Exp[-x])}, u, {x, -10, 10}, {t, 0, 2}]

Animate[Show[
Plot[f[x, t, 4, 2, 1, 4], {x, -4, 4}, PlotRange -> {0, 6},
PlotStyle -> {Thickness[0.01]}],
Plot[u[t, x] /. data, {x, -4, 4}, PlotRange -> {0, 6}]
], {t, 0, 2}]

-
 Everything worked for me. Restart Mathematica and then re-evaluate your block of code above. – JohnD Dec 11 '12 at 2:54 f is a pretty common symbol to use as a custom/temporary function. You probably had a previous definition for f (or data, which is equally common) which interfered with the animation. Quit the kernel and try again. – rm -rf♦ Dec 11 '12 at 2:55

## closed as too localized by Jens, rm -rf♦Dec 11 '12 at 5:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.