clear all; close all;
%------------------- demo_funz_leb.m ---------------------------
% This script plots the Lebesgue function of F-H's interpolant at
% 40 equidistant nodes on [0,1].
%
% Functions called: weights, leb_function
%
%----------------------------------------------------------------
% Authors
% 
%      Stefano De Marchi and Cinzia Bandiziol
%      Department of Mathematics
%      University of Padova
%             
% Version: May 2015		
%----------------------------------------------------------------		

a=0; b=1; %endpoints

n=40;     %number of nodes
d=3;      %blending parameter

x=linspace(a,b,n)';
w=weights(d,x);

[lambda_n_fun,points]=leb_function(a,b,n,x,w);

plot(points,lambda_n_fun,'b-');
title('Lebesgue function at equidistant points');