function [arr] = num_grid(xbox,ybox)

% 
% for x=1:xbox
%     for y=1:ybox
%         arr(x,y)=ybox*(x-1)+y;
%     end
% end

for y=1:ybox
    for x=1:xbox
        arr(x,y)=2*(xbox*(y-1)+x)-1;
    end
end

