Home /
Expert Answers /
Computer Science /
i-need-help-with-this-code-in-matlab-curve-fitting-is-the-process-of-constructing-a-curve-or-ma-pa937
(Solved): I need help with this code in MatLab.
Curve fitting is the process of constructing a curve, or ma ...
I need help with this code in MatLab.
Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points. For this problem: 1. Using polyfit(), to best fit the vectors x and y to a quadratic polynomial. 2. Evaluate this quadratic polynomial for values from the minimum value of x to the maximum value of x in steps of 0.1 . (Important: use code to determine the min and max values of x, don't hardcode these values!) 3. Use a single plot function with function handle h to plot x and y as blue circles, and the fitted quadratic polynomial as a smooth red line (no markers). Example Output. Please note that even though axes labels, a title, and a legend have been provided in the example above, it is not necessary to add them in your solution.