-1
$\begingroup$
Table[x, {i, 5}]

In mathematica 9 this results in {x,x,x,x,x}, but in v10 it's {1,1,1,1,1} . How do I produce {x,x,x,x,x} in BOTH versions? I actually want one of length 151

$\endgroup$
  • 2
    $\begingroup$ I don't think that's changed in v10 (in fact, I confirmed it). Did you Clear[x] before you ran your code in v10? $\endgroup$ – Cassini Nov 1 '15 at 13:42
  • $\begingroup$ You must have made an assignment x = 1, before you evaluated your Table expression. $\endgroup$ – m_goldberg Nov 1 '15 at 15:19
2
$\begingroup$

ConstantArray[x,151] should work for you as well.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.