Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Write a computer program for a Lagrange interpolator given n data points that may or may not be uniformly spaced. (a) Test your interpolation

image text in transcribed

3. Write a computer program for a Lagrange interpolator given n data points that may or may not be uniformly spaced. (a) Test your interpolation for data points obtained from sampling known functions. How well does your interpolant reproduce the expected behavior of the function? Where are errors the greatest? What happens as n increases? (b) Apply your code to the Runge function f(x) = (1+ 25x2)-1 sampled at n uniformly spaced points between -1 and 1 (see Moin Example 1.1). Discuss your results as n increases. (c) Repeat (b) but with points spaced closer together near the boundaries and farther apart in the middle of the domain (see Moin Example 1.2). Hint: One way to pick points clustered this way is to use the cosine of a uniformly spaced angle. (d) Repeat (a-c) but with cubic spline interpolation. You may use built-in functions for spline interpolation. (e) (open ended) Explore/review other interpolation options in MATLAB

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

More Books

Students also viewed these Databases questions

Question

b. Determine the number of dependent variables, p.

Answered: 1 week ago