Question: In class, we used the MATLAB function polyfit () to calculate curve fit coefficients corresponding to polynomials of different degrees. A first order-polynomial is a
In class, we used the MATLAB function polyfit () to calculate curve fit coefficients corresponding to polynomials of different degrees. A first order-polynomial is a linear model for data of the form where ap and a, are constants representing the y-intercept and the slope, respectively. These coefficients may be calculated using the equations below. These equations may be developed by using a little calculus to minimize the "error" between the data apd the line. In the equations above, xi and y; are the data points. Step 1, Repeat the first in-class activity with the file Class10Datal.mat. Load the x, y) data into memory. Scatter plot the data as symbols .Use polyfit() to generate a linear curve fit. .Plot the curve fit line on top of the scatter plot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
