天天看点

最小二乘曲线拟合及其matlab实现,最小二乘曲线拟合及MATLAB实现

最小二乘曲线拟合及MATLAB实现

摘  要

介绍曲线拟合的基本理论,对最小二乘原理进行了全方位的理论阐述,同时也阐述了曲线拟合的基本原理及多项式曲线拟合模型的建立。详细的解答了曲线拟合中的最小二乘法,并介绍了部分的正交最小二乘法理论。重点讲解多项式拟合的具体步骤,同时也介绍了非线性方程的最小二乘拟合,在建立理论的基础上对最小二乘曲线拟合法的MATLAB实现方法进行研究,利用MATLAB2012b的平台对测量数据进行最小二乘曲线拟合,介绍MATLAB的具体构造和曲线拟合工具。利用MATLAB中的ployfit函数对实测数据进行多项式曲线拟合,并给出曲线拟合MATLAB实现的源程序,给出拟合曲线,并评定拟合的精度证明该方法是行之有效的。

关键词:最小二乘法,曲线拟合,MATLAB,测量数据

Curve Fitting in Least-Square Method

and Its Realization with Matlab

Abstract

To introduce the basic theory of curve fitting and discuss the least squares principle in this paper, what’s more, we also discuss the basic principle of curve fitting and the establishment of polynomial curve fitting model. Meanwhile, we also introduce the least-square method of curve fitting in detail and part of the theory of orthogonal least square method. We mainly discuss the specific steps of polynomial fitting, and also introduces the nonlinear equation of the least squares fitting at the same time, which established on the theory of least squares curve fitting in MATLAB in order to realize the method to do research. Using MATLAB2012b platform to achieve the goal of measuring data and introducing the special structure of MATLAB and curve fitting tool. We can use ployfit function in MATLAB to polynomial curve fitting of experimental data, and get the MATLAB source program about curve fitting and the fitting curve. Finally, we need to prove the method of assessing the precision of the fitting is effective.

Key words: least square method;  curve fitting;  MATLAB, metrical data

最小二乘曲线拟合及MATLAB实现I

摘  要I

CURVE FITTING IN LEAST-SQUARE METHOD AND ITS REALIZATION WITH MATLABII

ABSTRACTII

第一章 引 言1

1.1研究背景1

1.1.1 历史理论原理1

1.1.2 现代研究1

1.2 问题定义2

1.2.1 曲线拟合的思想2

1.2.2 多项式拟合3

1.2.3 利用Matlab的polyfit函数进行多项式拟合3

1.3 论文结构3

第二章 数据曲线拟合4

2.1测量数据4

2.2拟合模型4

2.3最小二乘原理5

2.3.1最小二乘法5

2.3.2最小二乘估计与极大似然估计7

2.4数据拟合9

2.4.1曲线拟合理论9

2.4.2最小二乘法线性拟合原理10

2.4.3最小二乘非线性拟合12

2.4.4正交多项式13

2.4.5正交最小二乘曲线拟合15

2.5曲线拟合精度评定17

第三章MATLAB19

3.1MATLAB概述19

3.1.1MATLAB简介19

3.1.2MATLAB的主要组成部分21

3.2MATLAB2012B的运行简介23

3.2.1启动和退出MATLAB2012b23

3.2.2MATLAB2012b桌面系统24

3.2.3MATLAB函数调用系统26

3.2.4MATLAB2012b的帮助系统27

3.2.5附件管理系统28

3.2.6数据交换系统28

3.2.7MATLAB 中的其他系统29

3.3最小二乘曲线拟合法的MATLAB实现30

第四章 最小二乘法曲线拟合的MATLAB实现32

4.1 使用POLYFIT函数实现多项式拟合32

4.2 二次多项式的曲线拟合33

4.3三次多项式的曲线拟合34

4.4 四次多项式曲线拟合35

4.5数据处理和精度评定36

第五章 总结40

参考文献41

附录1:43

MATLAB语言编程源代码43

附录2:45

各次拟合的拟合曲线方程45

致谢46

外文翻译47

外文部分47

翻译部分54