Home /
Expert Answers /
Computer Science /
please-answer-7-a-b-c-7-use-matlab-to-fit-various-piecewise-polynomials-to-the-runge-function-usin-pa709

please answer 7 a,b,c

7. Use MATLAB to fit various piecewise polynomials to the Runge function, using the same nodes as in part (a) of exercise 4. (a) Find the piecewise linear interpolant of $f(x)$. (You may use MATLAB routine interp1 or write your own routine. Type help interp1 in MATLAB to find out how to use interp1.)
(b) Find the piecewise cubic Hermite interpolant of $f(x)$. (Write your own routine for this, using formulas (8.17) and (8.18).) (c) Find a cubic spline interpolant of $f(x)$. (You may use either the interp1 command or the spline command in MATLAB.) In each case above, plot $f(x)$ and the interpolant on the same graph. If you wish, you can put all of your graphs on the same page by using the subplot command.
4. (a) Use MATLAB to fit a polynomial of degree 12 to the Runge function $f(x)=1+x_{2}1?,$ interpolating the function at 13 equally-spaced points between -5 and 5. (You can set the points with the command $x=[?5:5/6:5];$.) You may use the MATLAB routine polyfit to do this computation or you may use your own routine. (To find out how to use polyfit type help polyfit in MATLAB.) Plot the function and your 12th-degree interpolant on the same graph. You can evaluate the polynomial at points throughout the interval $[?5,5]$ using MATLAB's polyval routine, or you may write your own routine. Turn in your plot and a listing of your code.

To start, we will generate the nodes and the Runge funct

Live Sessions

Online Lab Report Help

Online Project Report Help

Online Assignment Help

Essay Writing Help

CPM Homework Help

Mortgage Calculator

Electrical Engineering

Civil Engineering

Chemical Engineering

Electronics and Communication Engineering

Mathematics

Physics

Chemistry

Software Works/ Computer Science

Other Subjects

100% Correct Solutions

24/7 Availability

One stop destination for all subject

Cost Effective

Solved on Time

Plagiarism Free Solutions

Confidentiality