function deternode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% determination of the nodes
% n     : degree
% h     : grid width
% name  : Application name
% xx    : position of nodes
% xi,xe : initial and end points
%
% Created by G.Apaydin in June 2006
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global xi xe n h name xx
xmin=floor(xi)-n*h; xmax=ceil(xe)+n*h;
while(xi-xmin>=(n+1)*h),xmin=xmin+h;end
while(xmax-xe>=(n+1)*h),xmax=xmax-h;end
xx=xmin:h:xmax;
figure;axes('LineWidth',2,'FontName','Times','FontSize',18);hold on;
axis([xmin-h xmax+h -0.5 0.5]);plot([xi xe],[0 0],'b','LineWidth',2);
cwd=pwd;cd('output');saveas(gcf,[name,'Region.fig']);
close;cd(cwd);