资源描述:
《数据拟合MATLAB实验作业.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1、在飞机的机翼加工时,由于机翼尺寸很大,通常在图纸上只能标出部分关键点的数据.某型号飞机的机翼上缘轮廓线的部分数据如下。用插值法求x每改变0.1时的y值,画出图形表示。x04.749.051938577695114133152171190y05.238.111.9716.1517.116.3414.6312.166.697.033.990x=[04.749.051938577695114133152171190];y=[05.238.111.9716.1517.116.3414.6312.166.697.033.990];cx=0:0.1:190;cy=inter
2、p1(x,y,cx,'spline');plot(x,y,'+',cx,cy,x,y,'r:')xlabel('chang'),ylabel('kuang')2、已知观测数据点如表所示:xy0-0.4470.11.9780.23.280.36.160.47.080.57.340.67.660.79.560.89.480.99.3111.2分别用1次和3次多项式函数曲线拟合这些数据点,画出图形。x=0:0.1:1;y=[-0.4471.9783.286.167.087.347.669.569.489.311.2];A=polyfit(x,y,1)z=polyval(A
3、,x);plot(x,y,'k+',x,z,'r')x=0:0.1:1;y=[-0.4471.9783.286.167.087.347.669.569.489.311.2];A=polyfit(x,y,3)z=polyval(A,x);plot(x,y,'k+',x,z,'r')3、教材P327习题1cK=0.0728cKA=0.0731T=[68688787106106140140];P=1e+03*[9798113.3219.007813.3559.791814.27799.656312.463];K=[0.08480.08970.07620.08070.069
4、60.07530.06110.0651];cT=68:0.5:140;cP=1e+03*9.0078:0.05:1e+03*14.277;cK=griddata(T,P,K,99,1e+03*10.3,'cubic')cKA=griddata(T,P,K,99,1e+03*10.3,'linear')4、教材P327习题4,初始值为V0=0,=0.05x=5.55773.5002f=6.14906.66167.49138.11478.58328.93539.39879.6604f=6.14906.66167.49138.11478.58328.93539.39879
5、.6604functionf=dianya(x,t)f=10-(10-x(1))*exp(-t/x(2))t=[0.51234579];V=[6.366.487.268.228.668.999.439.63];x0=[0.20.05];x=lsqcurvefit('dianya',x0,t,V)f=dianya(x,t)