function x = leja(n) M = 10000; y = linspace(-1,1,M)'; x(1) = 1; for i=2:n T = prod(abs(y-x),2); [~,id] = max(T); x = [x,y(id)]; end x = sort(x); end