Question: Recall the nested form for Newton's polynomial p ( x ) = a 0 + ( x - x 0 ) ( a 1 +

Recall the nested form for Newton's polynomial
p(x)=a0+(x-x0)(a1+(x-x1)(a2+(x-x2)(a3+cdots+an(x-xn-1))))
The following Matlab program computes the value of this polynomial:
function p= nestedNewton (a,xp,x)
// input: a --vector for a_n values,
//xp-- vector for xn values
//x-. the point x where p(x) is evaluated
// output: p-. the value p(x)
n=lentgh(a);p=a(n);
for k=n-1:-1:1
// missing content for the for-10op
end
end
Fill in the Matlab code that is missing in the for-loop.
p=p**(x-x(k))+a(k);
p=p**(x-x(k))-a(k);
p=p**(x**x(k))+a(k);
p=p(x-x(k))+a(k);
 Recall the nested form for Newton's polynomial p(x)=a0+(x-x0)(a1+(x-x1)(a2+(x-x2)(a3+cdots+an(x-xn-1)))) The following Matlab

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!