My question is probably best illustrated with this small sample code:
Manipulate[
Plot[{eqn1, eqn2, eqn1-eqn2}, {x,-5,5}],
{{eqn1,r-x,"y1="}},{{eqn2,E^-x,"y2="}},
{r,-2,2}
]
I would like to be able to have the user input two equations which including a variable r
, and then use the slider to manipulate this variable. The issue is that Manipulate
changes r
within the input field, and then doesn't update the graphs.
Is there a way of allowing the user to input an equation which contains one of Manipulate
's variables without having it change that variable within the input field?
r
to be interdependent, but not the controls themselves, so that change one control won't affect the input field itself. So essentially, the variabler
is dependent on all controls, but the controls shouldn't be interdependent of each other. $\endgroup$eqn1
asr - x
in theInputField
instead of e.g.1-x
(ifr
is 1)? If I'm correct, than indeed my first example is the way to do it. $\endgroup$Manipulate
behaves, but isn't strictly answering my question. $\endgroup$