how can I write this exponential function and plot it in matlab?

I want to write this function in matlab,but always wrong.
y=[(-14)*e^( -1500*x )]+[26*e^(-20000*x)]
I written as
y=(-14)*exp.^( -1500*x )+26*exp^(-20000*x)
I don't know where was wrong.
and I want to plot this function.

4 Comments

remove the ^ and .^ just exp(something)
Hi W
Thank you! It's right.
but I don't know why the graph is wrong.
Show us your complete attempt.
Hi K ,this is my complete attempt.
y=(-14)*exp(-1500*x )+26*exp(-20000*x)
plot(x,y)

Sign in to comment.

 Accepted Answer

hello
don't forget to define x if you want an output :
x = linspace(0,0.005,500);
y=(-14)*exp(-1500*x )+26*exp(-20000*x);
plot(x,y);

More Answers (0)

Tags

Asked:

G G
on 28 Jun 2021

Commented:

G G
on 28 Jun 2021

Community Treasure Hunt

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

Start Hunting!