matlab中坐标范围及其步长的设定代码如下syms m b t h g;m=0.650;b=0.97; g=9.79;h=7.86;t=[0:0.04:1.48];y1=h+(g-0.2233)*(1-exp(-b*t))/b^2-(g-0.2233)*t/b;plot(t,y1,'g','LineWidth',1.5 ),axis([0 1.5 0 8]),axis('square'),gridtitle('篮球下
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 15:47:30
matlab中坐标范围及其步长的设定代码如下syms m b t h g;m=0.650;b=0.97; g=9.79;h=7.86;t=[0:0.04:1.48];y1=h+(g-0.2233)*(1-exp(-b*t))/b^2-(g-0.2233)*t/b;plot(t,y1,'g','LineWidth',1.5 ),axis([0 1.5 0 8]),axis('square'),gridtitle('篮球下
matlab中坐标范围及其步长的设定
代码如下
syms m b t h g;
m=0.650;
b=0.97;
g=9.79;
h=7.86;
t=[0:0.04:1.48];
y1=h+(g-0.2233)*(1-exp(-b*t))/b^2-(g-0.2233)*t/b;
plot(t,y1,'g','LineWidth',1.5 ),axis([0 1.5 0 8]),axis('square'),grid
title('篮球下落理想曲线(b=0.97)'),xlabel('t/s'),ylabel('y/m')
我现在是想设定横坐标的范围为0到1.5,步长值为0.1,如何修改代码?.
matlab中坐标范围及其步长的设定代码如下syms m b t h g;m=0.650;b=0.97; g=9.79;h=7.86;t=[0:0.04:1.48];y1=h+(g-0.2233)*(1-exp(-b*t))/b^2-(g-0.2233)*t/b;plot(t,y1,'g','LineWidth',1.5 ),axis([0 1.5 0 8]),axis('square'),gridtitle('篮球下
set(gca,'XLim',[0 1.5]);%X轴的数据显示范围
set(gca,'XTick',[0:0.1:1.5]);%设置要显示坐标刻度
set(gca,'XTickLabel',[0:0.1:1.5]);%给坐标加标签
具体可参考:
http://blog.csdn.net/yumengkk/article/details/6841164