Question: 4. (5 points) Fit the following data using the polyfit(x,y,n) function and allow the value of n to be greater than 1. Try to fit

 4. (5 points) Fit the following data using the polyfit(x,y,n) function

4. (5 points) Fit the following data using the polyfit(x,y,n) function and allow the value of n to be greater than 1. Try to fit determine the best degree of n that will best match the data below Time Time 0 0.5104 0.3345 0.0315 -0.1024 0.0787 Y(t 0.0139 0.0198 0.0181 0.0046 0.0037 2 4 10 The above data was derived from the following equation: Y(t) - e05t sin (t) Plot the original data points from the table AND a continuous plot from the equation Y(t) e0.5t sin (). Then, after applying polyfit, use polyval to generate the corresponding y-values and plot those as well. Your plot will have three separate graphs: the original table values, Y(t) e.St sin (t), and the fit curve you can derive In addition to the plots, MATLAB must also output the degree (n value) used to derive the chosen best fit Answer: The plot shown below is a representative example of what I am looking for; it is not what I would call a "best fit", it just illustrates what should be on the plot

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!