Given x=−1:0.2:1, calculate values of y from y=sin2(πx/2). Using these values of x:
a. Generate quadratic and quartic polynomials to ﬁt this data using the least squares MATLAB function polyfit. Display the data and the curve ﬁtted. Hint: Example 7.2 in Section 7.6 gives some guidance.
b. Fit a cubic spline to the data using the MATLAB function spline. Display the data and the ﬁtted spline. Compare the quality of this spline ﬁt with the two graphs from (a). For the data of Problem 7.3, determine the values of y for x=0.85 using the MATLAB function interp1 for a linear, spline, and cubic interpolating function. Also use the MATLAB function aitken.
The post Generate quadratic and quartic polynomials to ﬁt this data using the least squares MATLAB function polyfit. appeared first on Best Custom Essay Writing Services | EssayBureau.com.