1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| x = 0:0.01:0.05; y = 1:-0.18:0.1; plot(x,y)
x = [0 0.2 0.5 1.2 1.8 2.5 3.3 3.8 4 5]; y = [1 -1 0 0.8 0 -0.6 0 0.2 0.15 -0.1]; xx=[0:0.01:5]; yy=spline(x,y,xx); %三次样条插值函数 plot(xx,yy)
% 显示坐标区网格线 grid on
% 设置坐标轴范围 xlim([0 0.06]) ylim([0 1])
% 设置坐标轴刻度 xticks([0 0.02 0.04 0.06]) yticks([0 0.5 1])
% 设置图框纵横比 left=200;%距屏幕左下角水平距离 bottem=200;%距屏幕左下角垂直距离 width=400;%宽度,像素数 height=200;%高度 set(gcf,'position',[left,bottem,width,height])
% 设置坐标轴名称 xlabel('t/s') ylabel('\omega_x/(\circ)*s^{-1}')
|