function showinoutmid(w)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plotting of the classification of b-splines for 1D
% splines are marked in the middle of of their support
% the inner and outer b-splines for w=1
% the extended,normal inner and outer bsplines for w=2
%
% Created by G.Apaydin in June 2006
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global name gi gj xx bb n h;
cwd=pwd;cd('output');open([name,'Region.fig']);
plot(xx,zeros(1,length(xx)),'k','LineWidth',2);
yy=[-0.05 0.05];[XX,YY]=meshgrid(xx,yy);plot(XX,YY,'k','LineWidth',2);
%------------------------FOR THE THESIS------------------------------------
%for i=1:length(bb),
%    if bb(i)==3,plot(xx(i)+(n+1)*h/2,0,'bo','MarkerFaceColor','b','MarkerSize',11);
%    elseif bb(i)==2,plot(xx(i)+(n+1)*h/2,0,'go','MarkerFaceColor','g','MarkerSize',11);
%    elseif bb(i)==1,plot(xx(i)+(n+1)*h/2,0,'ro','MarkerFaceColor','r','MarkerSize',11);
%    end,
%end,
%------------------------FOR THE JOURNAL-----------------------------------
for i=1:length(bb),
    if bb(i)==3,plot(xx(i)+(n+1)*h/2,0,'k^','MarkerFaceColor','k','MarkerSize',11);
    elseif bb(i)==2,plot(xx(i)+(n+1)*h/2,0,'ko','MarkerFaceColor','k','MarkerSize',11);
    elseif bb(i)==1,plot(xx(i)+(n+1)*h/2,0,'ko','MarkerFaceColor','w',...
            'MarkerSize',11,'LineWidth',2);
    end,
end,
%--------------------------------------------------------------------------
gii=find(bb==3);xlabel('x');
if w==1,
    title([num2str(length(gj)),' outer, ',num2str(length(gi)),...
        ' inner b-splines for n=',num2str(n),' & h=',num2str(h)],'FontSize',16);
    saveas(gcf,[name,'inoutbsplnmid.jpg']);cd(cwd);
else 
    title([num2str(length(gj)),' outer, ',num2str(length(gii)),...
        ' extended inner & ',num2str(length(gi)-length(gii)),...
        ' standard inner b-splines for n=',num2str(n),...
        ' & h=',num2str(h)],'FontSize',16);
    saveas(gcf,[name,'inoutextbsplnmid.jpg']);cd(cwd);
end,
