Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Summing items in a list' topicStudent Support Forum > General > "Summing items in a list"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Daniele Lupo
09/17/05 02:44am

Yoy can apply function Plus in this way

Plus@@list

Plus is the equivalent of +, and it need many arguments

Plus[a,f,b,...]

It does not work if the argument is a list

Plus[{a,b,f,...}]

so, the @@ operator works in this way

f@@{a,b,c} -> f[a,b,c]

and you've elements of the list as arguments, not the entire list that it's different (it's an unique list argument).

I hope that it can help you

Daniele

URL: ,

Subject (listing for 'Summing items in a list')
Author Date Posted
Summing items in a list Luke 09/14/05 9:52pm
Re: Summing items in a list Daniele Lupo 09/17/05 02:44am
Re: Summing items in a list yehuda ben-s... 09/17/05 11:25am
Re: Summing items in a list Alvin 09/27/05 7:48pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic