| 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, |
|