Question: Matlab problem 3. Code up the piecewise polynomial interpolation algorithm. y-pwInterp(x, f, d, k), where x is the input variable, f is the function we
Matlab problem 3. Code up the piecewise polynomial interpolation algorithm. y-pwInterp(x, f, d, k), where x is the input variable, f is the function we want to approximate, vector d contains the endpoints for each interval, and k is the degree of the interpolating polynomial on each subinterval. The output y is the value of the interpolating polynomial on the input x. Test your code with the parameters d-linspace (1,1, 5) k-2. Plot this piecewise interpolating function on xplot-linspace(-1, 1, 200)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
