踏板力-踏板位移曲線
- 文件介紹:
- 該文件為 docx 格式,下載需要 20 積分
- 踏板力-踏板位移曲線clear;clc;
x=[13.6486 23.7462 35.5334 60.9783 96.6743 147.736 198.793 256.685 299.294 399.989 502.383];
y=[1.3267 10.059 16.851 29.912 39.711 49.778 60.111 70.181 75.220 78.953 83.216];
p1=polyfit(x(1:2),y(1:2),1);
p2=polyfit(x(2:4),y(2:4),1);
p3=polyfit(x(4:9),y(4:9),1);
p4=polyfit(x(9:end),y(9:end),1);
Y1=vpa(poly2sym(p1,'x'),6)
Y2=vpa(poly2sym(p2,'x'),6)
Y3=vpa(poly2sym(p3,'x'),6)
Y4=vpa(poly2sym(p4,'x'),6)
x1=min(x(1:2)):0.01:max(x(1:2));
x2=min(x(2:4)):0.01:max(x(2:4));
x3=min(x(4:9)):0.01:max(x(4:9));
x4=min(x(9:end)):0.01:max(x(9:end));
y1=polyval(p1,x1);
y2=polyval(p2,x2);
y3=polyval(p3,x3);
y4=polyval(p4,x4);
plot(x,y,'o',x1,y1,x2,y2,x3,y3,x4,y4)
M文件...