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 CenterFile Exchange에서 2-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