Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago