In the following section, we will see the regression and how to develop it.
Regression
Getting ready
Regression is similar to interpolation. In this case, we assume that the data is imprecise and we require an object of predetermined structure to fit the data as closely as possible. The most basic example is univariate polynomial regression to a sequence of points. We obtain that with the polyfit command, which we discussed briefly in the Univariate polynomials section of this chapter. For instance, if we want to compute the regression line in the least-squares sense for a sequence of 10 uniformly spaced points in the interval (0, π/2) and their values under the sin function.