Question: For this problem you will test a few interpolation approaches for the application of generating interpolated data. We'll do this by interpolating data that is

For this problem you will test a few interpolation approaches for the application of generating interpolated data. We'll do this by interpolating data that is sampled from a known mathematical function. The same function can then be used to compute true values at the interpolated points to use in error calculations.
Consider the following mathematical function (Runge's function):
RUNGE's FUNCTION
Write a function mfile that uses this formula to generate a set of data points. Your function should use those points along with the interpolation approaches outlined below to generate interpolated data (x_i, f_i) on a specified increment. Your function should accept the following inputs (in order):
A vector of x values at which f(x) is to be evaluated to generate the sampled data.
A scalar input specifying the increment to use for the interpolated data.
Your function should use the following three approaches to generate interpolated data:
A polynomial of order (N-1) where N is the number of points in the sampled data
A linear spline
A clamped cubic spline with derivative end conditions set to values equal to the exact analytical derivative of f(x) evaluated at the end points.
Your function should have the following three outputs (in order):
The interpolated data (f_i) generated with polynomial interpolation (column vector)
The interpolated data (f_i) generated with a linear spline (column vector)
The interpolated data (f_i) generated with the clamped cubic spline (column vector)
Note this problem is similar to the humps_interp.m example.

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!