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

2 visualizaciones (últimos 30 días)
G G
G G el 28 de Jun. de 2021
Comentada: G G el 28 de Jun. de 2021
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 comentarios
KSSV
KSSV el 28 de Jun. de 2021
Show us your complete attempt.
G G
G G el 28 de Jun. de 2021
Editada: G G el 28 de Jun. de 2021
Hi K ,this is my complete attempt.
y=(-14)*exp(-1500*x )+26*exp(-20000*x)
plot(x,y)

Iniciar sesión para comentar.

Respuesta aceptada

Mathieu NOE
Mathieu NOE el 28 de Jun. de 2021
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);

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by