Question: Matlab please :) Generate ten data points in MATLAB using the following syn- thax: linspace (-1,1,10); y = 1./(1+5*x. ^2); Then fit a polynomial of

 Matlab please :) Generate ten data points in MATLAB using the

Matlab please :)

Generate ten data points in MATLAB using the following syn- thax: linspace (-1,1,10); y = 1./(1+5*x. ^2); Then fit a polynomial of degree 9 to this data. Produce a plot where data is plotted as red circles while the polynomial is plotted with a blue line. In order to make the polynomial graph smooth, generate a new, finer grid xx = linspace (-1,1,200); and plot the polynomial on that grid. As your solution, present the MATLAB code and the plot. Also, make a quick observation about the goodness of fit. Generate the following data in MATLAB: x = linspace (o,2*pi,50); y = 2*cos (x)-sin(x) + .1*randn (size(x)); Now pretend that you do not know the coefficients 2 and (-1) in the harmonic. Compute those coefficients by solving an ap- propriate linear system. As your solution, present code and a plot where data is shown as red circles and the fit is plotted as a solid line. To make the line smooth, plot the fit on a finer grid, as in the previous exercise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!