How do I plot an equation?

1 vue (au cours des 30 derniers jours)
Caitlin Schmidt
Caitlin Schmidt le 14 Sep 2021
Réponse apportée : Voss le 30 Avr 2022
How would I be able to plot the following equation into matlab : y=e^(-x/0.005)?

Réponses (1)

Voss
Voss le 30 Avr 2022
One way:
x = -0.02:0.0001:0.02;
y = exp(-x/0.005);
plot(x,y)
Another way:
y = @(x)exp(-x/0.005);
fplot(y,[-0.02 0.02])

Catégories

En savoir plus sur Mathematics 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