Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Use MATLAB CODE and Ouptut with answer. 1. Interpolate the function f(z-Tr. x e [-5,5] on n + 1 Chebyshev nodes. 1+2 (a) The
Please Use MATLAB CODE and Ouptut with answer.
1. Interpolate the function f(z-Tr. x e [-5,5] on n + 1 Chebyshev nodes. 1+2 (a) The formula for the Chebyshev nodes in the notes are for the interval [-1,1]. Transform it to the interval [-5,5 (b) Plot the interpolating polynomial fn(x) and the function f() on -5,5] in the same graph and use legend to distinguish them. Do this for n-5, 10, 15, 20 and group these four graphs in a single figure with subplot. Feel free to use the LagrangeForm.m file on Canvas. (c) Use a for loop to calculate the error maxI) In(a) by using the inf Err.m file on Canvas for n = 10, 20, 30, 40, . .. , 100 and save them in the vector errors. Generate the log plot for errors against n-10, 20, , 100 by using the semilogy function. Add labels to each axis of your plot. What conclusion can you draw from the graph? How does the error change with the degree of the interpolating polynomials? 1. Interpolate the function f(z-Tr. x e [-5,5] on n + 1 Chebyshev nodes. 1+2 (a) The formula for the Chebyshev nodes in the notes are for the interval [-1,1]. Transform it to the interval [-5,5 (b) Plot the interpolating polynomial fn(x) and the function f() on -5,5] in the same graph and use legend to distinguish them. Do this for n-5, 10, 15, 20 and group these four graphs in a single figure with subplot. Feel free to use the LagrangeForm.m file on Canvas. (c) Use a for loop to calculate the error maxI) In(a) by using the inf Err.m file on Canvas for n = 10, 20, 30, 40, . .. , 100 and save them in the vector errors. Generate the log plot for errors against n-10, 20, , 100 by using the semilogy function. Add labels to each axis of your plot. What conclusion can you draw from the graph? How does the error change with the degree of the interpolating polynomials
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started