Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'For-Function in Animate-Function' topicStudent Support Forum > General > Archives > "For-Function in Animate-Function"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Stefan Salanski
02/28/12 2:54pm

andrew,
I cant tell exactly what you are trying to do, but I think I can at least help get you from that last step to what you want.

if you have as the output of that cell,
something + something + something ...
and you want it to be a list instead of a sum,
you can Apply the head 'List' to that expression. what i mean is, take that expression (call it 'disks') and write Apply[List,disks], or List@@disks

what this does is take the 'something + something +...', which is actually 'Plus[something,something,... ]' and change 'Plus' to 'List', so you get out:
{something, something, something... }

So basically, just on the next line, write List@@%

While I think this will get you what you want, I'm almost certain this isnt the best way to do it, maybe if you posted a bit of code as to how you would do it in java or c++, it would be more clear to me what you were trying to do.

URL: people.virginia.edu/~sws4e,

Subject (listing for 'For-Function in Animate-Function')
Author Date Posted
For-Function in Animate-Function Andrew 02/28/12 09:40am
Re: For-Function in Animate-Function Stefan Salan... 02/28/12 2:54pm
Re: For-Function in Animate-Function Bill 02/28/12 4:07pm
Re: For-Function in Animate-Function Andrew 03/02/12 11:46am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic