Question: please, copy and paste matlab only 2. Create a function that calculates the coefficients of the least-squares regression for a 2nd order polynomial. Use LU

please, copy and paste matlab only please, copy and paste matlab only 2. Create a function that calculates

2. Create a function that calculates the coefficients of the least-squares regression for a 2nd order polynomial. Use LU Decomposition to find the coefficients. The function should have: Input: X and Y Output: a_0, a_1, a_2, r^2, r. Please test your function on the data below and plot the results. Be sure to save your function and include it in your homework submission! X-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 Y 8560 45 40 2718 10 0 2 2 1 7 8 15 23 33 50 58 81

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!