Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am using matlab. please help me to fix the code to pass the last error Write a MATLAB function, called Newtons_divided_differences that inputs a
I am using matlab. please help me to fix the code to pass the last error
Write a MATLAB function, called Newtons_divided_differences that inputs a set of data points (x,y)=( dat x, daty ), a set x of numbers at which to interpolate, and outputs the polynomial interpolant, y, evaluated at $x$ using Newton's divided differences. Your function header should look something like: function y= Newtons_divided_differences (x, datx, daty ) Use the code you developed to interpolate the function f1(x)=exp{x2} using the data points dat x=3:1:3. Interpolate at the points x=3:0.01:3. Call P5 the obtained interpolant. Plot the results and comment on the error. Compare your result with the one while interpolating with Lagrange_poly: write your answer and obsvervations in a Matlab comment. Previous Assessment: 1 of 2 Tests Passed Respect guidelines Test for P5 Variable P5 must be of size [601 1]. It is currently of size [1 601]. Check where the variable is assigned a value. OutputStep 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