MATLAB Answers

How to plot e^(-2n)

조회 수: 1(최근 30일)

채택된 답변

Stephen Cobeldick
Stephen Cobeldick 2020년 12월 2일
f = @(x)exp(-2*x);

추가 답변(2개)

VBBV 2020년 12월 2일
n = 1:10;
grid on

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


Community Treasure Hunt

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

Start Hunting!

Translated by