Question: please use matlab please Write a user-defined MATLAB function polyfit2n(x, y, n) that calculates several polynomial fits for the data arrays x and y, where
Write a user-defined MATLAB function polyfit2n(x, y, n) that calculates several polynomial fits for the data arrays x and y, where y = f(x). The function should output the polynomial fits together with the quality of fit using the SSE criterion, for polynomials of degree 1, 2, .... n. The output of the function should look something like the following: The polynomial fit of degree 1 is given as ...) with SSE = ... The polynomial fit of degree 2 is given as ...) with SSE = ... The polynomial fit of degree 3 is given as ....) with SSE =... Use the function on the following data points: v (mi/h) 20 30 40 50 60 70 d (ft) 45 80 130 185 250 330
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
