Question: Note: I need MATLAB code ASAP please 2. Apply the function compute Lebesgue function(xi,x) to the four cases of evenly- and unevenly-spaced grids you studied

Note: I need MATLAB code ASAP please
2. Apply the function compute Lebesgue function(xi,x) to the four cases of evenly- and unevenly-spaced grids you studied in Exercise 2. To this end, set x to be a vector of 1000 evenly-spaced nodes in [-1,1 (including endpoints), and write a function function [L1,L2 ,L3 ,L4,el,e2,e3,e41-Lebesgue-constant sand-errors () that plots the Lebesgue function (4) for the aforementioned four cases (4 different Figures) The function should also return the value of the Lebesgue constants L1, L2, L3, L4 and the maximum point-wise errors e1, e2, e3, e4 defined as ma0 (x())-/x) i: 1, ,1000 for each case you studied in Exercise 2. Remark: Recall, that the smaller the Lebesgue constant the smaller the approximation error of the Lagrangian polynomial interpolation. If fact, we have seen in class that 2. Apply the function compute Lebesgue function(xi,x) to the four cases of evenly- and unevenly-spaced grids you studied in Exercise 2. To this end, set x to be a vector of 1000 evenly-spaced nodes in [-1,1 (including endpoints), and write a function function [L1,L2 ,L3 ,L4,el,e2,e3,e41-Lebesgue-constant sand-errors () that plots the Lebesgue function (4) for the aforementioned four cases (4 different Figures) The function should also return the value of the Lebesgue constants L1, L2, L3, L4 and the maximum point-wise errors e1, e2, e3, e4 defined as ma0 (x())-/x) i: 1, ,1000 for each case you studied in Exercise 2. Remark: Recall, that the smaller the Lebesgue constant the smaller the approximation error of the Lagrangian polynomial interpolation. If fact, we have seen in class that
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
