function ShowBsplines()
% Look at B-splines over the interval [a,b} where
a = 3; b = 10;
% and the breakpoints x(1),...,x(n) are spacified by
n = 15;
x = linspace(a,b,n);
% The subinterval length...
h = (b-a)/(n-1);
% for k=0:n+1 display B_{k}(z) = Bstar((z-x(k))/h)...
% First display the x-axis and a sufficient number of breakpoints...
z = linspace(a-4*h,b+4*h,200)';
plot(z,zeros(200,1),'-k')
hold on
for j=1:n
    plot([x(j) x(j)],[-.03 .03],'r','linewidth',2)
end
plot([a-3*h a-3*h],[-.03 .03],'k','linewidth',2)
plot([a-2*h a-2*h],[-.03 .03],'k','linewidth',2)
plot([a-h a-h],[-.03 .03],'k','linewidth',2)
plot([b+h b+h],[-.03 .03],'k','linewidth',2)
plot([b+2*h b+2*h],[-.03 .03],'k','linewidth',2)
plot([b+3*h b+3*h],[-.03 .03],'k','linewidth',2)
axis([1 12 -.5 1.5])
% Now display the B_{k} ...
for k=0:n+1
    % Evaluate B_{k} at the z-values...
    if k==0
        alpha = a-h;
    elseif k==n+1
        alpha = b+h;
    else
        alpha = x(k);
    end
    y = Bstar((z-alpha)/h);
    % Display...
    h0 = plot(z,y,alpha,0,'.g','markersize',25);
    if k>0 && k<n+1
       h1 = text(alpha-.2,-.1,sprintf('x(%1d)',k),'fontsize',14);
    end
    shg
    pause
    delete(h0)
    if k>0 && k<n+1
        delete(h1)
    end
end
hold off
shg

