Question: Answer using Matlab Table 1: x y 2 -4 3 9 5 28 8 20 10 -2 11 4 1 (20%) Write a function that

 Answer using Matlab Table 1: x y 2 -4 3 9

Answer using Matlab

Table 1:

x y
2 -4
3 9
5 28
8 20
10 -2
11 4

1" (20%) Write a function that implements Lagrange interpolation, with the following input/output. function y Lagrange (datapt X, da taptY,x) end In the input bracket, where dataX and dataY are two arrays that storing values of the data points for interpolating (,yl), and x is the value of x in the function for calculating y. if you have n+1 points (meaning n + 1 elements in dataX, dataY), you should fit nth order Lagrange. Use all the values from table 1, and calculate x-9.5 through the program and give the answer. 2" (20%) Write a function that implements the Bisection method, with the following input/output function y = Bisection (f, xl, xu , mvalue) end % note f in the argument list is a function input. For example f representing the function f(x) in question 3 can be defined under the following way f = @ (x) exp(x)+x"3+2*x"2-1.2, and then you can use f directly as a function in Bisection(f,xl, xu, mvalue) xl and xu is your lower and upper boundary mvalue is the predefined threshold represented as m-value

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!