Question: Matlab code should be included in your work. You should be able to explain your code. 1. (6 points) Given the data points as follows
Matlab code should be included in your work. You should be able to explain your code.
1. (6 points) Given the data points as follows x =[4.0 4.2 4.5 4.7 5.1 5.5 5.9 6.3 6.8 7.1] y =[102.56 113.18 130.11 142.05 167.53 195.14 224.87 256.73 299.50 326.72]
a. Construct the least squares polynomial of degree 1, p1(x).
b. Construct the least squares polynomial of degree 2, p2(x).
c. Construct the least squares polynomial of degree 3, p3(x).
d. Construct the least squares approximation of the form beax , pe(x).
Plot all the four least squares approximation functions as well as the data points in ONE figure.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
