电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

最小二乘逼近VIP免费

最小二乘逼近_第1页
1/6
最小二乘逼近_第2页
2/6
最小二乘逼近_第3页
3/6
实验名称最小二乘逼近实验目的和 要 求1 掌握最小二乘逼近的的基本思路和步骤2 培养使用matlab 软件编程及上机调试能力实验内容和步骤:实验内容:用最小逼近法计算以下3 题:1、Given the table Xi -2 -1 0 1 2 Yi -0.1 0.1 0.4 0.9 1.6 Solve a quadratic and cubic fitting functions respectively with the least squares method 2、Find the least squares polynomials of degree1,2and 3 for the data in the following table. Compute the error in each case .Graph the data and the polynomials. Xi 1.0 1.1 1.3 1.5 1.9 2.1 Yi 1.84 1.96 2.21 2.45 2.94 3.18 3、Given the data: Xi 4.0 4.2 4.5 4.7 5.1 5.5 5.9 6.3 6.8 7.1 Yi 102.56 113.18 130.11 142.05 167.53 195.14 224.87 256.73 299.50 326.72 (1) Construct the least squares polynomials of degree 1,2and 3, and compute the errors. (2)Construct the least squares approximation of the form beax, and compute the errors 试验步骤:1)实验编程2)运行结果实验过程1、Given the table Xi -2 -1 0 1 2 Yi -0.1 0.1 0.4 0.9 1.6 Solve a quadratic and cubic fitting functions respectively with the least squares method 解:>> x=[-2 -1 0 1 2 ]; y=[-0.1 0.1 0.4 0.9 1.6]; plot(x,y,'r*'), legend(' 数据点 (xi,yi)') >> a=polyfit(x,y,2) a = 0.0857 0.4200 0.4086 >> a=polyfit(x,y,3) a = 0.0083 0.0857 0.3917 0.4086 2、Find the least squares polynomials of degree1,2and 3 for the data in the following table. Compute the error in each case .Graph the data and the polynomials. Xi 1.0 1.1 1.3 1.5 1.9 2.1 Yi 1.84 1.96 2.21 2.45 2.94 3.18 解:>>x=[1.0 1.1 1.3 1.5 1.9 2.1]; y=[1.84 1.96 2.21 2.45 2.94 3.18]; plot(x,y,'r*'), legend(' 数据点 (xi,yi)') >> a=polyfit(x,y,1) a = 1.2196 0.6209 >> a=polyfit(x,y,2) a = -0.0109 1.2533 0.5966 a=polyfit(x,y,3) a = -0.0100 0.0353 1.1850 0.6290 >> x=[1.0 1.1 1.3 1.5 1.9 2.1]; y=[1.84 1....

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

最小二乘逼近

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部