plotting a function correctly

1 回表示 (過去 30 日間)
N/A
N/A 2020 年 10 月 27 日
コメント済み: N/A 2020 年 10 月 27 日
f(x)= exp(-x)-x
The x intercept is between 0 and 1 on other graphing software, yet mat lab incorrectly puts the x intercept after 2. Please correct my code.
x=[-2:0.1:2];
y = exp(-x)-x;
plot(x,y)

採用された回答

Sindar
Sindar 2020 年 10 月 27 日
x=[-2:0.1:2];
y = exp(-x)-x;
plot(x,y)
  1 件のコメント
N/A
N/A 2020 年 10 月 27 日
Thank you. lol

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by