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

Say I want a slider that controls the value of $x$ and another slider that controls the value of $2x$, how would I go about it?

share|improve this question
Is it purely abstract question or you need this for something else? I am curios what you're trying to achieve with this. – Vitaliy Kaurov Feb 5 '12 at 22:47
Need this for a tool that helps me to play around with speed (split time) / time / distance for the rowing machine. – Peteris Feb 6 '12 at 10:20
up vote 14 down vote accepted


{Slider[Dynamic[x], {0, 10}], 
 Slider[Dynamic[2 x, Set[x, #/2] &], {0, 20}]}

enter image description here

The documentation explains, under More Information, that "Dynamic[expr,f] makes interactive operations not change expr except by virtue of the evaluation of f[val,expr]. ". Otherwise, Mathematica attempts to assign a value to 2x.

share|improve this answer

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.