# Manipulate not showing anything

This works:

Manipulate[Plot[2*x + 3*y, {x, 3, 4}], {y, 3, 4}]


But this doesn't

f=2*x + 3*y
Manipulate[Plot[f, {x, 3, 4}], {y, 3, 4}]


My "f" is a painful long expression so I'd rather be able to get the latter method to work than work with the former.

-

## 1 Answer

Manipulate has to 'see' the that f depends on y, so define it as follows:

f[x_, y_] = 2*x + 3*y
Manipulate[Plot[f[x, y], {x, 3, 4}], {y, 3, 4}]


By the way, this is mentioned in the "Possible Issues" section of the Manipulatedoc page.

-
Thanks a lot!. That saved me a ton of time. I usually look at "More Information" and all the options and examples but I don't always look at "possible issues". I will keep it in mind to check it every time from now on. Thx. –  Amatya Aug 28 '12 at 20:35