Skip to main content
added 13 characters in body
Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

@Alan have gave an elegant way to solve the problem.

Here we just mention that the original expression:

Table[expr[xTable[expr[s1, ys2, zs3, pt1, qt2,r] t3], {xs1, {-1, 1}}, {ys2, {-1, 1}}, {zs3, {-1, 1}}, {pt1, {-1, 1}}, {qt2, {-1, 1}}, {rt3, {-1, 1}}]

is equivalent to

Outer[expr, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}]

@Alan have gave an elegant way to solve the problem.

Here we just mention that the original expression:

Table[expr[x, y, z, p, q,r], {x, {-1, 1}}, {y, {-1, 1}}, {z, {-1, 1}}, {p, {-1, 1}}, {q, {-1,1}}, {r, {-1, 1}}]

is equivalent to

Outer[expr, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}]

@Alan have gave an elegant way to solve the problem.

Here we just mention that the original expression:

Table[expr[s1, s2, s3, t1, t2, t3], {s1, {-1, 1}}, {s2, {-1, 1}}, {s3, {-1, 1}}, {t1, {-1,1}}, {t2, {-1, 1}}, {t3, {-1, 1}}]

is equivalent to

Outer[expr, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}]
Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

@Alan have gave an elegant way to solve the problem.

Here we just mention that the original expression:

Table[expr[x, y, z, p, q,r], {x, {-1, 1}}, {y, {-1, 1}}, {z, {-1, 1}}, {p, {-1, 1}}, {q, {-1,1}}, {r, {-1, 1}}]

is equivalent to

Outer[expr, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}, {-1, 1}]