14Curve_Fitting_&_Interpolation

14Curve_Fitting_&_Interpolation

ID:40254309

大小:986.19 KB

页数:26页

时间:2019-07-29

14Curve_Fitting_&_Interpolation_第1页
14Curve_Fitting_&_Interpolation_第2页
14Curve_Fitting_&_Interpolation_第3页
14Curve_Fitting_&_Interpolation_第4页
14Curve_Fitting_&_Interpolation_第5页
资源描述:

《14Curve_Fitting_&_Interpolation》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、APPLICATIONSOFMATLABINENGINEERINGYan-FuKuoFall2015Dept.ofBio-industrialMechatronicsEngineeringNationalTaiwanUniversityToday:•Polynomialcurvefitting•Multipleregression•InterpolationApplicationsofMATLABinEngineeringY.-F.Kuo2SimpleLinearRegression•Abunchofdatapoints(??,??)ar

2、ecollected•Assume?and?arelinearlycorrelated?(??,??)??=?0+?1????(??,??)?ApplicationsofMATLABinEngineeringY.-F.Kuo3LinearRegressionFormulation•Definesumofsquarederrors(???):???=?2=(?−?)2?????•Giventhattheregressionmodel:??=?0+?1??,???=(?−?−??)2?01??•Whatvariablesareknownand

3、whatareunknown?•Howdoweobtaintheoptimalparameters?ApplicationsofMATLABinEngineeringY.-F.Kuo4SolvingLeast-squaresProblem•???isminimizedwhenitsgradientwithrespecttoeachparameterisequaltozero:??2??=−2??−?0−?1??=0??0???2??=−2??−?0−?1????=0??1?ApplicationsofMATLABinEngineering

4、Y.-F.Kuo5Least-squaresSolution•Supposethereexists?datapoints:????=?0∙?+?1???=1?=1?????=??+??2??0?1??=1?=1?=1??????0⇒=?1????2????ApplicationsofMATLABinEngineeringY.-F.Kuo6PolynomialCurveFitting:polyfit()15•Curvefittingfordatapoints10best-fitpolynomialsof5differentorders0-5

5、-10-15-20-2-101234x=[-1.2-0.50.30.91.82.63.03.5];y=[-15.6-8.52.24.56.68.28.910.0];fit=polyfit(x,y,1);xfit=[x(1):0.1:x(end)];yfit=fit(1)*xfit+fit(2);plot(x,y,'ro',xfit,yfit);set(gca,'FontSize',14);legend(2,'datapoints','best-fit');ApplicationsofMATLABinEngineeringY.-F.Kuo7

6、Exercise•Giventhetablebelow:1.Findthe?0and?1oftheregressionline2.PlotthefigureCalibrationofTC0.08TCOutputTemperature0.07(mV)(oC)0.060.025200.035300.050.05040TCoutput(mV)0.040.060500.030.080600.022030405060oTemperature(C)ApplicationsofMATLABinEngineeringY.-F.Kuo8Are?and?Li

7、nearlyCorrelated?•Ifnot,thelinemaynotwell10describetheirrelationship5•Checkthelinearitybyusing0-5•scatter():scatterplot-10•corrcoef():correlation-15coefficient,−1≤?≤1-20-2-101234x=[-1.2-0.50.30.91.82.63.03.5];y=[-15.6-8.52.24.56.68.28.910.0];scatter(x,y);boxon;axissquare;

8、corrcoef(x,y)ApplicationsofMATLABinEngineeringY.-F.Kuo9HigherOrderPolynomialsx=[-1.2-0.50.30.91.

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。