How do I plot an equation?

How would I be able to plot the following equation into matlab : y=e^(-x/0.005)?

回答 (1 件)

Voss
Voss 2022 年 4 月 30 日

0 投票

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])

カテゴリ

タグ

質問済み:

2021 年 9 月 14 日

回答済み:

2022 年 4 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by