0
$\begingroup$

I want to generate a table that gives the following output:

output: {"x1", "x2", "x3", "x4", "x5"}

I have tried:

Table["x"*i, {i, 5}] 

which gives

{"x", 2 "x", 3 "x", 4 "x", 5 "x"}

I wonder what is a correct way of doing this?

$\endgroup$
4
3
$\begingroup$
Table["x" <> ToString[i], {i, 5}]

{"x1", "x2", "x3", "x4", "x5"}

$\endgroup$
1
  • $\begingroup$ That was clever, thank you loads gonna accept this :) $\endgroup$ – Wiliam Aug 2 '18 at 13:22

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