Question: In matlab, please help me solve 2. Use MATLAB to generate 7 equally spaced data points from Runge's function: f(x)=1+25x21 on the interval 1x1. Use
In matlab, please help me solve

2. Use MATLAB to generate 7 equally spaced data points from Runge's function: f(x)=1+25x21 on the interval 1x1. Use these 7 data points to generate an interpolated approximation of the function f(x) for x=[1:0.01:1] using: 1) A6th order polynomial 2) A linear spline 3) A cubic spline with derivative end conditions equal to the exact values of the derivative calculated analytically, using spline function 4) A cubic spline with "not-a-knot" end conditions. For each case, calculate the true relative error (t) for every value of x. Your script should only output your results for part (1) to (4) as column vectors (201x1) and your t results to a matrix (2014)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
