Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'very weird' topicStudent Support Forum > General > Archives > "very weird"

Next Comment >Help | Reply To Topic
Author Comment/Response
Virgiliu
05/24/07 12:10pm

Does anybody understand why this thow pices of code behave differently ?
n = 3; graph = Table[0, {n}];
For[i = 1, i <= n, i++,
graph[[i]] = Plot[Sin[x + i], {x, 0, \[Pi]}]];
ListAnimate[graph]

and

graph = Table[Plot[Sin[x + i], {x, 0, \[Pi]}], {i, 3}];
ListAnimate[graph]

the first one does not work. it gives some weird error when the second one works !!!!!!!

URL: ,

Subject (listing for 'very weird')
Author Date Posted
very weird Virgiliu 05/24/07 12:10pm
Re: very weird Forum Modera... 06/08/07 2:11pm
Next Comment >Help | Reply To Topic