Question: Consider the data table x: 1, 3, 4, 6 H: 14, 800, 6000, 3.26*10^5 1)Find coefficients of the interpolation polynomial for this data table using

Consider the data table

x: 1, 3, 4, 6

H: 14, 800, 6000, 3.26*10^5

1)Find coefficients of the interpolation polynomial for this data table using the InterpolationProblem.m code.

function [ C ] = InterpolationProblem ( x_i, y_i ) % This function calculates coefficients C of the interpolation polynomial % for the given tabulated data x_i and y_i % x_i(1) = x_1, x_i(2) = x_2, etc. % y_i(1) = y_1, y_i(2) = y_2, etc. N = length ( x_i ); % Number of points in the table A = zeros ( N, N ); % Create a matrix of coefficients % Calculate the matrix of coefficients, see Slides 19 and 20 in Section 3.3 for i = 1 : N % i is the row index for j = 1 : N % j is the column index A(i,j) = x_i(i)^(N-j); % See Eq. (3.3.8) end end % Here we solve the SLE. The solution is the vector of coefficients of % the interpolation polynomial C = inv ( A ) * y_i'; end 2) Calculate value of the interpolation polynomial at x=5. Write MATLAB code that solves. 

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!