3.0 3.1 2.9 2.5 2.0 1.6];Рy02=[0 1.2 1.7 2.0 2.1 2.0 1.8 1.2 1.0 1.6];Рx=0:0.1:15;Рy1=interp1(x0,y01,x);Рy2=interp1(x0,y02,x);Рplot(x,y1,x,y2),Рs=trapz(x,y1)-trapz(x,y2),Рs =10.7500Р(三次样条插值法)Рx0=[0 3 5 7 9 11 12 13 14 15];Рy01=[0 1.8 2.2 2.7 3.0 3.1 2.9 2.5 2.0 1.6];Рy02=[0 1.2 1.7 2.0 2.1 2.0 1.8 1.2 1.0 1.6];Рx=0:0.1:15;Рy1=spline(x0,y01,x);Рy2=spline(x0,y02,x);Рplot(x,y1,x,y2),Рs=trapz(x,y1)-trapz(x,y2),Рs =11.3444Р二、Рx0=[0 2 4 5 6 7 8 9 10.5 11.5 12.5 14 16 17 18 19 20 21 22 23 24];Рy0=[2 2 0 2 5 8 25 12 5 10 12 7 9 28 22 10 9 11 8 9 3];Рx=0:1/60:24;Рy=spline(x0,y0,x);Рplot(x,y),Рs=trapz(x,y),Рs =211.1414Р实验结果报告及实验总结:Р一题中,用分段线性插值法所求面积为s =10.7500,而用三次样条插值法求的面积为s =11.3444。二题中所求一天通过桥梁的车流量为s =211.1414,图形可看出一天车流量走势。Р思考与深入:Р一题中两种方法所求图形有差别,可看出三次样条插值法所求曲线比分段线性插值法所求曲线更为平滑。三次样条插值法所求曲线更为精确。Р教师评语: