Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started