Question: Question 4. Write a MATLAB script file to perform the following: (i) [1 mark] Find the Lagrange coefficient polynonials, L, (x), i = 0, 1,
Question 4. Write a MATLAB script file to perform the following: (i) [1 mark] Find the Lagrange coefficient polynonials, L, (x), i = 0, 1, 2, for the data set x = 01 2] and y- 13 2 (ii) 1 mark ] Plot each Lagrange coefficient polynomial. (iii) [1/2 mark ] Verify the property that L,(xj) = 1 when i-) and L,(zj) = 0 when i . iv) 1/2 mark ] Calculate the values of the Lagrange polynomial P2(x) at all values of r and verify (x)0 when ifj. that they agree with the corresponding values of y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
