Question: Option 1: Polynomial Interpolation Your task is to create a function animateInterpolation(fs, xs1, xs2) that produces an animation showing how an interpolating polynomial changes as

 Option 1: Polynomial Interpolation Your task is to create a function

Option 1: Polynomial Interpolation Your task is to create a function animateInterpolation(fs, xs1, xs2) that produces an animation showing how an interpolating polynomial changes as the interpolation nodes change. The function should take the following inputs: fsIf, f,f",..: a cell array containing f and its derivatives xs1: the interpolation nodes at the start of the animation. o xs2: the interpolation nodes at the end of the animation. Your program should have the following propertics: 1. The program should include a function generalInterpolation(fs,xs) that finds the interpolating polynomial including in cases where there are repeated points (inlcud- ing Hermite interpolation, where the points are doubled, and Taylor series, where all nodes are in the same location). It should do this by constructing a divided differ- ence table, then returning the polynomial defined by the table and the interpolating nodes xs. If you find this part too difficult, you may write your program assuming all points in xs1,xs2 are distinct, and use Matlab's polyfit,polyval instead of a divided difference table. 2. The interpolating nodes should change "smoothly" over time from the points in xs1 to the corresponding points in xs2. One way to do this is to define xpts t*xs1 + (1-t)*xs2 as t changes from 0 to 1, but you might consider other functions as well. 3. The limits of the x-axis and y-axis for the animation should remain fixed. 4. Optionally, allow the user to save the animation as a GIF

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!