欢迎来到天天文库
浏览记录
ID:27571273
大小:372.19 KB
页数:11页
时间:2018-12-03
《matlab数学实验报告3》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、MATLAB作业数学建模与数学实验MATLAB实验报告指导老师:实验时间:学院:专业班级:姓名:学号:实验六、练习学号班级姓名指导教师实验题目数组与矩阵输入评分一、设计(实习)目的:1多项式拟合(polyfit);2非线性拟合(lsqcurvefit)二、实验内容:1、测16名成年女子的身高与腿长所得数据如下表1身高(cm)143145146147149150153154155156157158159160162164腿长(cm)8885889192939395969897969899100102请作出身高和腿长之间的散点图,你能猜想出身高和腿长的大致关系。
2、并用数据拟合求相应的系数。2、对下列数据进行拟合表2xi0.10.20.30.40.50.6yi-0.4471.9783.286.167.087.34xi0.70.80.91.01.1yi7.669.569.489.3011.2试建立y与x的模型。3、表3给出的近两百年的美国人口统计数据,表3美国人口统计数据年(公元)1790180018101820183018401850人口(百万)3.95.37.29.612.917.123.2年(公元)1860187018801890190019101920人口(百万)31.438.650.262.976.092.01
3、06.5年(公元)193019401950I960197019801990人口(百万)123.2131.7150.7179.3204.0226.5251.4若用非线性回归模型来拟合,请编程求回归系数+w,r的值。三、详细设计3.functiony=curvefun(a,t)y=a(1)7(1+(a(1)/3.9-1)*exp(-a(2)*t));在此保存;再建一个M文件:1=0:20;y=[3.95.37.29.612.917.123.2...31.438.650.262.976.092.0106.5...123.2131.7150.7179.3204.02
4、26.5251.4];a0=[200().11;a=lsqcurvefit(’curvefun’,aO,t,y)z=curvefun(a,t)plot(t,y;+*,t,z)tl=22;yl=curvefun(a,t)运行后结果为:Z=Columns1through933.11173.90005.13856.76178.882811.643915.220219.822425.6956Columns10through18164.374642.351653.673667.267283.1946101.3314121.3252142.5932185.8325Col
5、umns19through21206.1781224.7813241.2349Optimizationterminated:relativefunctionvaluechangingbylessthanOPTIONS.ToIFun.311.95460.279833.1117Columns1through93.90005.13856.76178.882811.643915.220219.822425.6956164.3746Columns10through1842.351653.673667.267283.1946101.3314121.3252142.593
6、2185.8325Columns19through21206.1781224.7813241.2349Optimizationterminated:relativefunctionvaluechangingbylessthanOPTIONS.TolFun.a=311.95460.2798z=Columns1through83.90005.13856.76178.882811.643915.220219.822425.6956Columns9through1633.111742.351653.673667.267283.1946101.3314121.3252
7、142.5932Columns17through21185.8325206.1781224.7813241.2349Optimizationterminated:relativefunctionvaluechangingbylessthanOPTIONS.TolFun.a=0.2798Columns1through83.90005.13856.76178.8828Columns9through1642.351653.673667.2672Columns17through21185.8325206.1781224.781311.643915.220219.82
8、2425.695683.1946101.331412
此文档下载收益归作者所有