Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What were Escoffier's contributions to the culinary world?

Answered: 1 week ago

Question

6. Identify seven types of hidden histories.

Answered: 1 week ago

Question

What is human nature?

Answered: 1 week ago