Re: Problem with animate
- To: mathgroup at smc.vnet.net
- Subject: [mg47340] Re: Problem with animate
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Tue, 6 Apr 2004 06:36:23 -0400 (EDT)
- References: <c4rd13$m9n$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
As you stated, n has a value. Either clear n before using it as an iterator or
use a module to make it local.
Module[{n}, Animate[Plot[Sin[n x],{x,0,2 Pi}],{n,1,6,1}]];
Bob Hanlon
In article <c4rd13$m9n$1 at smc.vnet.net>, "Phil Light"
<usenet at kaysgardens.OppositeOfMinus.com.invalid> wrote:
<< I am trying to use animate as shown in the documentation with v5, but
instead of producing a graph for each value of n as expected, I only get one
graph uses the value of n before the Animate command:
-------------------------
<< Graphics`Animation`
In[87]:=
Animate[Plot[Sin[n x],{x,0,2 Pi}],{n,1,6,1}]
<<<Single graph for value of n before this command, in this case 35>>>
Out[87]=
Animate[-Graphics-, {35, 1, 6, 1}]
----------------------------
Anyone know what I'm doing wrong?