I've created a function f and a slider:


How to execute/call f each time the slider is dragged?

  • $\begingroup$ Still no code formatting or capitalization in your original question (other people were kind enough to edit)... $\endgroup$
    – Ajasja
    Dec 12, 2012 at 14:14

2 Answers 2


Like this


You can can test using for example


I advise you to look at the help of Dynamic that contains examples of other related features.


Another rout to take would be just using Manipulate. It will update content inside of it automatically in addition to automatically creating an interface.

f[y_] := y
Manipulate[f[y], {y, 1, 4}]

enter image description here

  • $\begingroup$ @user4972 What do you mean? Do you need more help? $\endgroup$ Dec 13, 2012 at 16:17
  • $\begingroup$ @VitaliyKaurov He means that he registered the code above and got a patent for it. You're forbidden to use Manipulate[] again without his granting permission. $\endgroup$ Jan 12, 2013 at 10:52
  • $\begingroup$ @belisarius big :D $\endgroup$ Jan 13, 2013 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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