How to plot a y=e^x function

157 views (last 30 days)
Monica DelaCruz
Monica DelaCruz on 24 Feb 2018
Edited: Dyuman Joshi on 27 Jan 2024
I have the task to plot a graph using the function y=e^x but I am having trouble with the constant e. Do I have to define e first? or is there another way to rewrite this equation?

Accepted Answer

Stephen23
Stephen23 on 24 Feb 2018
Edited: Stephen23 on 24 Feb 2018
  1 Comment
Dyuman Joshi
Dyuman Joshi on 20 Jan 2024
Edited: Dyuman Joshi on 27 Jan 2024
This can be obtained using fplot as well -
%Plot the exp function from x = -2 to x = 3
fplot(@exp, [-2 3])

Sign in to comment.

More Answers (0)

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!