MathGroup Archive 2013

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

Search the Archive

Animate Command and Vector Reference


I'm new to Mathematica and I want to create some animations. I tried something like this:

sub = {{a, 1}, {a^2, 1}}
Animate[Graphics[{Line[{{0, 0}, sub[[1]]}]}], {a, -1, 1}]

and Mathematica give me an error. This error ( Coordinate {a, 1} should be a pair of numbers, or a Scaled or Offset form.) is not helpful.

I know that I can fix this by changing sub[[1]] to {a,1}, but this is not a great solution. I have several places in the actual Animate command that use sub[[1]] (some in conjunction with a Table command) and it would be painful to do all of the replacing and rewriting. How can I make something like this work?

I suspect that I'm missing something simple....


Thanks in advance!

Will

 



  • Prev by Date: Re: Complex path integral wrong
  • Next by Date: Re: Russian Peasant Multiplication / was question on how to do this
  • Previous by thread: Re: Rather simple function returns curious result. Explanation
  • Next by thread: Re: Animate Command and Vector Reference