Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'All possible combinations in function' topicStudent Support Forum > General > "All possible combinations in function"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
07/30/12 06:58am

Variables in Do, Table, ... may range over lists. Try something like

$A = {A1, A2, A3, A4, A5, A6};
$a = {a1, a2, a3, a4, a5, a6};
$b = {b1, b2, b3, b4, b5, b6};
$c = {c1, c2, c3, c4, c5, c6};
Do[f[A, a, b, c], {A, $A}, {a, $a}, {b, $b}, {c, $c}]

Replacing Do by Table returns nested lists containing all the results. Use Flatten if you want a simple (unnested) single list of results. (Beware, if 6^4 is a lot of values....)

URL: ,

Subject (listing for 'All possible combinations in function')
Author Date Posted
All possible combinations in function S16 07/28/12 4:28pm
Re: All possible combinations in function Michael 07/30/12 06:58am
Re: Re: All possible combinations in function S16 07/30/12 5:39pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic