MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help

  • To: mathgroup at
  • Subject: [mg92303] Re: Help
  • From: Norbert Marxer <marxer at>
  • Date: Sat, 27 Sep 2008 06:49:37 -0400 (EDT)
  • References: <gbjmbb$3ah$>

On 27 Sep., 00:05, Rui <rui.r... at> wrote:
> I'm new in Mathematica. I have version
> I'm trying to create an animation or a plot, something simple. I found
> Animate[].
> I can make it work fine by doing something "like"
> Animate[Plot[Sin[34*x-2*t], {x, 0, 2*pi}], {t, 0, 5} ]
> But if i have my expression stored in a variable i can't...
> a = Sin[34*x-2*t];
> Animate[Plot[a, {x, 0, 2*pi}], {t, 0, 5} ]
> leaves the animation blank.
> I tries all variants I could think of and I always fail. I actually
> wanted to create several animations of expressions i have stored in a
> list, and I could do it one by one manually but I wanted to learn the
> proper way and I'm frustrated already. Any ideas?


1. You should use Pi (instead of pi)

2. You should define a function a[t] oder a[t,x]. The following should

Clear[a, x, t]; a[t_] = Sin[34*x - 2*t];
Animate[Plot[a[t], {x, 0, 2*Pi}], {t, 0, 5}]


Clear[a, x, t]; a[t_, x_] = Sin[34*x - 2*t];
Animate[Plot[a[t, x], {x, 0, 2*Pi}], {t, 0, 5}]

Best Regards
Norbert Marxer

  • Prev by Date: Re: flop-count
  • Next by Date: Re: Help
  • Previous by thread: Re: Help
  • Next by thread: Re: Help