Message Boards Message Boards

0
|
2212 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Can I use Manipulate to change both a & b in the following: f = a Exp[bx]?

Posted 12 years ago
Hi all, I'm new to Mathematica and have been playing a bit. I'd like to be able to plot an exponential function and change both "a" and "b" with sliders. I thought that this:

Manipulate[ Plot[{a*Exp[b`x]}, {x, 0, 75},   PlotRange -> {{0, 100}, {0, 200}}], {a, 15, 25}, {b, 0.02, 0.03}]

would do it, but it gives me a blank plot.

Any help for a newbie is appreciated!

Thanks,
Jeff
2 Replies
Almost correct: multiplication of b and x should be written as a * or as a space:
Manipulate[ Plot[{a*Exp[b x]}, {x, 0, 75},   PlotRange -> {{0, 100}, {0, 200}}], {a, 15, 25}, {b, 0.02, 0.03}]
or
Manipulate[ Plot[{a*Exp[b*x]}, {x, 0, 75},   PlotRange -> {{0, 100}, {0, 200}}], {a, 15, 25}, {b, 0.02, 0.03}]
POSTED BY: Sander Huisman
Awesome, thanks!
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract