0

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?

Wiliam
  • 2,976
  • 12
  • 14

1 Answers1

3
Table["x" <> ToString[i], {i, 5}]

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

kglr
  • 394,356
  • 18
  • 477
  • 896