function [a,b] = bkfchsg(x,j,Theta) % % [a,b] = bkfchsg(x,j,Theta) % % find the endpoints of the n-j disjoint open intervals with total length % j/(n-1)*diam(Theta) contained within conv(Theta) mentioned in the paper of % Shadrin. He predicts the Birkhoff spline bkfspmak(x,j,Theta) has exactly one % zero when x is in one of these intervals and otherwise is of constant sign. % This behaviour is indeed observed when using bkfplt to view the spline. % % S. Waldron October 1994 % Theta=sort(Theta); n=length(Theta); p=poly(diag(Theta(2:n))); for i=1:j, p=polyder(p); end a=sort(roots(p))'; a=[min(Theta),a]; % the left endpoints of the intervals p=poly(diag(Theta(1:n-1))); for i=1:j, p=polyder(p); end b=sort(roots(p))'; b=[b,max(Theta)]; % the right endpoints of the intervals