Question: I want a matlab code for the question For the following data points: f(0.3)=0.740818,f(0.4)=0.670320,f(0.5)=0.606531andf(0.6)=0.548812 a) Use a Matlab/Octave command to fit a polynomial that passes
For the following data points: f(0.3)=0.740818,f(0.4)=0.670320,f(0.5)=0.606531andf(0.6)=0.548812 a) Use a Matlab/Octave command to fit a polynomial that passes through them. [2] b) Write a Matlab/Octave program to approximate the value f(0.45) using Lagrange interpolating polynomials of degree three. [4] c) Write a Matlab/Octave program to approximate the value f(0.45) using Newton's interpolating polynomials of degrees three to approximate the value f(0.45). [4] d) Write a Matlab/Octave program to approximate Write a Matlab/Octave program to approximate the value f(0.45) using Newton's Forward difference interpolating polynomials of degrees three to approximate the value f(0.45). [4] e) Which polynomial do you think gives a better approximation of f(0.45) Justify your answer. answer. [3] f) Plot the three interpolating polynomials on the same graph and comment on the graph. [3] For the following data points: f(0.3)=0.740818,f(0.4)=0.670320,f(0.5)=0.606531andf(0.6)=0.548812 a) Use a Matlab/Octave command to fit a polynomial that passes through them. [2] b) Write a Matlab/Octave program to approximate the value f(0.45) using Lagrange interpolating polynomials of degree three. [4] c) Write a Matlab/Octave program to approximate the value f(0.45) using Newton's interpolating polynomials of degrees three to approximate the value f(0.45). [4] d) Write a Matlab/Octave program to approximate Write a Matlab/Octave program to approximate the value f(0.45) using Newton's Forward difference interpolating polynomials of degrees three to approximate the value f(0.45). [4] e) Which polynomial do you think gives a better approximation of f(0.45) Justify your answer. answer. [3] f) Plot the three interpolating polynomials on the same graph and comment on the graph. [3]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
