How to plot e^(-2n)

2 ビュー (過去 30 日間)
Eric Dahl
Eric Dahl 2020 年 12 月 2 日
回答済み: Jon 2020 年 12 月 2 日
How would you actually plot e^(-2n) in Matlab?

採用された回答

Stephen23
Stephen23 2020 年 12 月 2 日
f = @(x)exp(-2*x);
fplot(f)

その他の回答 (1 件)

Jon
Jon 2020 年 12 月 2 日
Assign a vector of equally space values over the range of interest to the variable n
Assign a value y to a MATLAB expression that evaluates e^(-2n), check out the documentation for exp (type doc exp on the command line)
Use the plot command to plot y vs n check out the documentation for the plot command (type doc plot on the command line)
If you need to learn the basics of MATLAB I suggest the MATLAB On - Ramp training https://www.mathworks.com/learn/tutorials/matlab-onramp.html

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by