Question: 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
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 xi fi on a specified increment. Your function should accept the following inputs in order:
A vector of x values at which fx 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 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 fx evaluated at the end points.
Your function should have the following three outputs in order:
The interpolated data fi generated with polynomial interpolation column vector
The interpolated data fi generated with a linear spline column vector
The interpolated data fi generated with the clamped cubic spline column vector
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
