Question: Interpolation ( a ) Please implement functions p = ninterp ( n o d e v a l s , fvals ) y = polyeval
Interpolation
a Please implement functions
ninterp fvals
polyeval nodevals
where nodevals is the vector containing the interpolation nodes, fvals is the
vector containing function values at the nodes, and is a vector of Newton poly
nomial coefficients and polyeval evaluates the Newton polynomial via Horner's
method to a whole list of points in the vector
b Now use your ninterp function to interpolate the two functions
on the interval for and equidistant points. Plot both
interpolation polynomials with the functions they interpolate. Explain what you
see
Aside: If you want to declare a function which takes only one argument and
evaluates your specific Newton polynomial at any point to use when you plot,
you can do so inline as follows.
poly@ nodevals ;
linspace;
plotpoly;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
