Question: Need help/tutoring with MATLAB code I'm stuck have tried everything. MATH 365 Homework 7 due 12 March 1) In class, we wrote code for Lagrange

 Need help/tutoring with MATLAB code I'm stuck have tried everything. MATH

Need help/tutoring with MATLAB code I'm stuck have tried everything.

MATH 365 Homework 7 due 12 March 1) In class, we wrote code for Lagrange polynomial iterpolation with 2 and 3 data points. Your assignment is to write comperable code for Lagrange interpolation for an arbitrary number of data points. You need to create a data file called polyinfile.m. For example, let the con- tents of polyinfile.m be 1 3 1 1916 2 4 101 This means that we have three data points, namely (1,1), (2, 4), (3,9), and (4,16). Since there are four data points, you seek an interpolating polynomial of degree three (the number of data points is always one more than the degree of the interpolating polynomial). You should set up your data so that the 3-coordinates are in increasing order. The last number N (in this example, N = 101) is the number of points to use when you graph your interpolating polynomial. Your goal is to create a Matlab picture displaying the interpolating polyno- mial and the data points. It is not necessary to calculate a formula for the interpolating polynomial. You may not use other forms of interpolating polynomials. Nor may you use built-in functions such as polyfit or polyval or anything similar. MATH 365 Homework 7 due 12 March 1) In class, we wrote code for Lagrange polynomial iterpolation with 2 and 3 data points. Your assignment is to write comperable code for Lagrange interpolation for an arbitrary number of data points. You need to create a data file called polyinfile.m. For example, let the con- tents of polyinfile.m be 1 3 1 1916 2 4 101 This means that we have three data points, namely (1,1), (2, 4), (3,9), and (4,16). Since there are four data points, you seek an interpolating polynomial of degree three (the number of data points is always one more than the degree of the interpolating polynomial). You should set up your data so that the 3-coordinates are in increasing order. The last number N (in this example, N = 101) is the number of points to use when you graph your interpolating polynomial. Your goal is to create a Matlab picture displaying the interpolating polyno- mial and the data points. It is not necessary to calculate a formula for the interpolating polynomial. You may not use other forms of interpolating polynomials. Nor may you use built-in functions such as polyfit or polyval or anything similar

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!