Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have 4 output fields for something like the following:

n + x
n - x,
{n, 1, 10}, {x, 1, 10}, ControlType -> InputField]

but this just outputs all 4 calculations combined.

share|improve this question
Try something like this: Manipulate[ Row[{n*x, "," , n/x, ",", n + x ",", n - x}], {n, 1, 10}, {x, 1, 10}, ControlType -> InputField] – Artes Dec 15 '13 at 18:58
Brilliant - thank you :) – martin Dec 15 '13 at 19:01
Although this question arises from a simple mistake, I recommend that it not be closed because this is common problem for beginners, and the question and its answer is likely to help future visitors with a similar problem. – m_goldberg Dec 15 '13 at 19:33
@m_goldberg but then the title should be improved. Perhaps: "manipulate with multiple outputs"? Of course the main problem here is not Manipulate, but CompoundExpression (and the fact that it is not needed in top level notebook cells) – Ajasja Dec 15 '13 at 22:19
Related: Multiple output cells. One of the answers contains an answer to this question. – Michael E2 Dec 15 '13 at 22:52
up vote 6 down vote accepted

As mentioned in the comment by Artes, you can use Row, although you don't need to put in the "," individually. Row takes a spacing element as its second argument.

Manipulate[Row[{n*x, n/x, n + x, n - x}, ", "],
  {n, 1, 10},
  {x, 1, 10},
  ControlType -> InputField]


You can get much fancier, of course. For example:

   Row[{"n*x = ", n*x}],
   Row[{"n/x = ", n/x,}],
   Row[{"n + x = ", n + x}],
   Row[{"n - x = ", n - x}]}],
 {n, 1, 10},
 {x, 1, 10}, ControlType -> InputField]


For the ultimate in layout control, take a look at Grid.

share|improve this answer
Thank you - this is really helpful :) – martin Dec 15 '13 at 19:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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