# How can I predefine the variable ranges used within a Manipulate? [duplicate]

I would like to use a Manipulate environment with a large number of manipulable (?) variables, say {x1,0,1},{x2,0,1},{x3,0,3},etc. Rather than define them all directly in the Manipulate[], I'd like to define them ahead of a time, in a different cell.

How do I do this? The obvious solution, to make a list of ranges:

ranges={{x1,0,1},{x2,0,1},{x3,0,3}};
Manipulate[f(x1,x2,x3), ranges]


doesn't work, presumably because of the outer braces. But there appears to be no way to pull out the contents of the list without putting them in a new list; for instance ranges[[All]] returns ranges itself rather than its contents. But ranges[[1]] works just fine, that's not a list with one element but rather the element itself. Is there a way to get all of the elements out of ranges for use inside a Manipulate?

• Manipulate[f[x1, x2, x3], Sequence @@ ranges // Evaluate] Commented Oct 3, 2017 at 20:52
• @march: Fine answer. I suggest you post it so it can be accepted and others not be drawn to this (solved) question. Commented Oct 3, 2017 at 22:22
• @DavidG.Stork. Except, I'm almost certain that this is a duplicate question, I just can't find it. Commented Oct 3, 2017 at 22:23
• @DavidG.Stork. Well, maybe this one in the Related sidebar (although it's a little more complicated). Commented Oct 3, 2017 at 22:25
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Oct 3, 2017 at 22:31