Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code this in MATLAB and explain the process please and thank you! Exercise 3 Let (i (z))-0, N be the set of Lagrange characteristic polynomials
Code this in MATLAB and explain the process please and thank you!
Exercise 3 Let (i (z))-0, N be the set of Lagrange characteristic polynomials the nodes {zj);=0,..,N. We have seen in class that the polynomial interpolation error is related to the Lebesgue function with hy(x) = |lj(x)I (Lebesgue function) and the Lebesgue constant Aw-zmax 11 (2) (Lebesgue constant). z-1,1 1. Given the vector of interpolation nodes xi-[xi(i) xi(N+1)], write a Matlab/Octave Use the Matlab command x-linspace(-1,1,1000) to generate a vector of 1000 evenly spaced nodes in -1,]. function computeLebesgue-function.m that returns the Lebesgue function (4) and the Lebesgue constant (5). Such function should be of the form function Clambda, L]-computeLebesgue.function(xi.x) Input: xi: vector of interpolation nodes xi=[xi (1) . x: vector of points at which we want to evaluate the Lebesgue function Output: lambda: Lebesgue function (z) evaluated at x. L: Lebesgue constant , computed by taking the maximum of the vector lambdaStep 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