Plot shows a negative graph

조회 수: 10 (최근 30일)
Abhinandana R
Abhinandana R 2019년 1월 24일
댓글: Abhinandana R 2019년 1월 24일
hi, I need a positive exponential graph starting from zero. but it shows negative. what could I do now to get a positive exponential graph starting from zero? the coding is as follows,
u=0.02; i=22/7; g=800; l=2;
d=0.1; p=45; m=tand(p);
r=linspace(0,1,100);
a=(r-m*(d+l)).^5-((r-m*1).^5)
q=(i*g*a)./(40*u*m)
plot(r,q)

채택된 답변

madhan ravi
madhan ravi 2019년 1월 24일
Add the below two lines at the end of your code
xlim([-1 1]) % if you change the scale it is clear that it starts from zero
grid on
  댓글 수: 3
madhan ravi
madhan ravi 2019년 1월 24일
Abhinandana R
Abhinandana R 2019년 1월 24일
thank you sir!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by