Chapter 13Curve Fitting and Correlation.ppt
《Chapter 13Curve Fitting and Correlation.ppt》由会员分享,可在线阅读,更多相关《Chapter 13Curve Fitting and Correlation.ppt(35页珍藏版)》请在麦多课文档分享上搜索。
1、1,Chapter 13 Curve Fitting and Correlation,This chapter will be concerned primarily with two separate but closely interrelated processes: (1) the fitting of experimental data to mathematical forms that describe their behavior and (2) the correlation between different experimental data to assess how
2、closely different variables are interdependent.,2,The fitting of experimental data to a mathematical equation is called regression. Regression may be characterized by different adjectives according to the mathematical form being used for the fit and the number of variables. For example, linear regre
3、ssion involves using a straight-line or linear equation for the fit. As another example, Multiple regression involves a function of more than one independent variable.,3,Linear Regression,Assume n points, with each point having values of both an independent variable x and a dependent variable y.,4,P
4、reliminary Computations,5,Best-Fitting Straight Line,6,Example 13-1. Find best fitting straight line equation for the data shown below.,7,Example 13-1. Continuation.,8,Example 13-1. Continuation.,9,Example 13-1. Continuation., x = 0:9; yapp = 1.9721*x + 4.1455; y = the 10 values of y; plot(x, yapp,
5、x, y, o)The best-fit plot and the actual points are shown on the next slide.,10,11,MATLAB General Polynomial Fit, x = x1 x2 x3.xn; y = y1 y2 y3yn; p = polyfit(x, y, m) yapp = polyval(p, x) plot(x, yapp, x, y, o),12,Example 13-2. Rework Example 13-1 using MATLAB., x = 0:9; y = the 10 values of y; p =
6、 polyfit(x, y, 1) p =1.9721 4.1455These are the same values obtained manually in Example 13-1.,13,Example 13-3. For data of previous two examples, obtain a 2nd degree fit.,Assume that the vectors x and y are still in memory. p = polyfit(x, y, 2) p =0.0011 1.9619 4.1591 yapp2 = polyval(p, x); plot(x,
7、 yapp2, x, y, o)The results are shown on the next slide.,14,15,Example 13-4. Determine several polynomial fits for the function below., t = -1:0.05:1; y = sin(pi*t); plot(t, y)A plot of the function is shown on the next slide.,16,17,Example 13-4. Continuation.,(a) m = 1 p1 = polyfit(t, y, 1) p1 =0.8
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CHAPTER13CURVEFITTINGANDCORRELATIONPPT
