Question: Write down the code And take a screenshot for the outputs MATLAB 4. Fitting polynomials. Write a script to load the data file randomData.mat (which

Write down the code And take a screenshot for the outputs MATLAB
4. Fitting polynomials. Write a script to load the data file randomData.mat (which contains variables x and y) and fit first, second, third, fourth, and fifth degree polynomials to it. Plot the data as blue dots on a figure, and plot all five polynomial fits using lines of different colors on the same axes. Label the figure appropriately. To get good fits, you'll have to use the centering and scaling version of polyfit (the one that returns three arguments, see help) and its counterpart in polyval (the one that accepts the centering and scaling parameters). It should look like this: Poly nomial fits to noisy data 02 0.1 0.05 0.05 Data Order 1 Order 2 Order 3 Onder 4 Order 5 0.1 100 10 120 130 40 016070180 190 200
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
