Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Multiple iterators' topicStudent Support Forum > General > "Multiple iterators"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Henry Lamb
09/22/04 7:28pm

You can use Sequence to splice an iterator sequence into a function, such as Table, Sum, or Product. For example, suppose your iterators are

iter={{i,1,3},{j,1,3},{k,1,3}}

then you can assemble a table with

Table[a,Evaluate[Sequence@@iter]]

or a product with

Product[a,Evaluate[Sequence@@iter]].

However, if you want to compute a Sum, it's better to use Total, which doesn't require iterators.


URL: ,

Subject (listing for 'Multiple iterators')
Author Date Posted
Multiple iterators Mike 09/22/04 01:30am
Re: Multiple iterators Henry Lamb 09/22/04 7:28pm
Re: Multiple iterators Mike 09/27/04 4:38pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic