Plot shows a negative graph
14 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!