Plotting e^-t graph

150 vues (au cours des 30 derniers jours)
Pratik A
Pratik A le 21 Nov 2020
Commenté : Image Analyst le 21 Nov 2020
I have the task to plot a graph using the function y=e^(-t) but I am having trouble with the variable t. Do I have to define e or t first? or is there another way to rewrite this equation?

Réponse acceptée

VBBV
VBBV le 21 Nov 2020
Modifié(e) : VBBV le 21 Nov 2020
t = 0:0.1:10;
y = exp(-t);
plot(t,y)
define t and use exp function to calculate and plot the equation
  2 commentaires
John D'Errico
John D'Errico le 21 Nov 2020
Modifié(e) : John D'Errico le 21 Nov 2020
It seems like this is a very fequent (RECENT) question, with people not knowing about exp. I'm not sure why, but I wonder if all of these students are taking the same class, and their teacher never mentioned exp..
Image Analyst
Image Analyst le 21 Nov 2020
If they can't even do something as simple as 3 lines of code, then I guess they never took even the most basic introductory training.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by