Chapter 8. Polynomials, Curve Fitting, and Interpolation

Polynomials are mathematical expressions that are frequently used for problem solving and modeling in science and engineering. In many cases an equation that is written in the process of solving a problem is a polynomial, and the solution of the problem is the zero of the polynomial. MATLAB has a wide selection of functions that are specifically designed for handling polynomials. How to use polynomials in MATLAB is described in Section 8.1.

Curve fitting is a process of finding a function that can be used to model data. The function does not necessarily pass through any of the points, but models the data with the smallest possible error. There are no limitations to the type of the equations that can be used for curve fitting. Often, however, polynomial, exponential, and power functions are used. In MATLAB curve fitting can be done by writing a program, or by interactively analyzing data that is displayed in the Figure Window. Section 8.2 describes how to use MATLAB programming for curve fitting with polynomials and other functions. Section 8.4 describes the basic fitting interface that is used for interactive curve fitting and interpolation.

Interpolation is the process of estimating values between data points. The simplest kind of interpolation is done by drawing a straight line between the points. In a more sophisticated interpolation, data from additional points is used. How to interpolate with MATLAB is discussed in Sections ...

Get MATLAB®: An Introduction with Applications, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.