I have an expression assigned to a variable. For example:
exp1 = a*x+b
Now I would like to plot it using something like this
Manipulate[
Plot[Evaluate[ex99], {x, 0, 1}],
{a, 0, 1},
{b, 0, 1}]
I can see 'a' and 'b' being properly substituted by 'Evaluate', but Plot does not work as expected. I suspect it has something to do with 'x' substitution. How can I fix that? Thanks!
Manipulate[Plot[a*x + b, {x, 0, 1}], {a, 0, 1}, {b, 0, 1}]
? $\endgroup$Manipulate[Plot[a*x+b,{x,0,1},AxesOrigin->{0, 0}],{a,-1,1},{b,-1,1}]
in order to better see the results... $\endgroup$Manipulate[Plot[a*x+b,{x,0,1},AxesOrigin->{0,0},PlotRange->{{0,1},{-2,2}}], {a,-1,1},{b,-1,1}]
$\endgroup$