Coding in Maple

285 Views Asked by At

I am trying to animate a sequence of functions in Maple and I am stuck on how to do so.
This is what I have so far

animate(seq(plot(sin(n*x)/n, x = -Pi .. Pi), n = 1 .. 50));

but it keep coming up as an error for the range. I have to do this in Maple. Any ideas?

2

There are 2 best solutions below

1
On BEST ANSWER

Okay so What I should do is add the command insequence=true command in at the end of my code here:

display(seq(plot(sin(n*x)/n, x = -Pi .. Pi), n = 1 .. 50)). So it looks like

display(seq(plot(sin(n*x)/n, x = -Pi .. Pi), n = 1 .. 50), insequence = true);

Then just hit play.

0
On

You have the wrong syntax for animate. It takes three required arguments. The first is a plotting procedure, the second is a list of arguments to that procedure, and the third is the name and range of the animation parameter. So, it should be

animate(plot, [sin(n*x)/n, x= -Pi..Pi], n= 1..50);