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

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

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!