Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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