Question: WRITE A MATLAB CODE 1. Interpolation [25] In the following problem you will use different interpolation techniques and see their advantages/disadvantages. Consider the function 1
WRITE A MATLAB CODE
![WRITE A MATLAB CODE 1. Interpolation [25] In the following problem you](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e330315ff_43966f3e32fc5f5e.jpg)
1. Interpolation [25] In the following problem you will use different interpolation techniques and see their advantages/disadvantages. Consider the function 1 + x2 This is known as Runge's example. a) Plot the function using MATLAB in the interval -5 to 5 with 100 equidistant points.[5 b) Now evaluate the function in 16 equidistant points in the same interval and plot the points using the scatter command. When you plot, use hold on to plot in the same figure. [5 Make full polynomial interpolation of the dataset with 11 points and plot the polynomial in the same plot. Comment the result! c) d) Now use cubic spline (standard MATLAB spline) to make piecewise interpolation of the dataset with 11 data points. Plot the error i.e. the difference between the spline result and the actual function in given interval. Comment on the result! e) Using the command fminbnd, find for which value of x is the biggest error in spline interpolation! 1. Interpolation [25] In the following problem you will use different interpolation techniques and see their advantages/disadvantages. Consider the function 1 + x2 This is known as Runge's example. a) Plot the function using MATLAB in the interval -5 to 5 with 100 equidistant points.[5 b) Now evaluate the function in 16 equidistant points in the same interval and plot the points using the scatter command. When you plot, use hold on to plot in the same figure. [5 Make full polynomial interpolation of the dataset with 11 points and plot the polynomial in the same plot. Comment the result! c) d) Now use cubic spline (standard MATLAB spline) to make piecewise interpolation of the dataset with 11 data points. Plot the error i.e. the difference between the spline result and the actual function in given interval. Comment on the result! e) Using the command fminbnd, find for which value of x is the biggest error in spline interpolation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
