Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago