title: distribute same size circles evenly inside a square using Matlab
body: <p>I have a figure of size 14 x 14 square drawn inside an axis of 20 x 20, in matlab.
  I am trying to draw circles of radius 0.7 inside the square and need to arrange them evenly. I need to draw 233 circles. Please let me know how can I do it? 
  Currently I can draw them randomly but couldn't get 233 circle. Please see my below code. 
  Your reply is appreciated.</p>
  
  <pre><code>% Urban, sub urban, Rural areas
        x_area =[3, 12, 6];
        y_area = [6, 8, 16];
        r_area = [1, 7, 2];
  
  
         f = figure;
         hAxs = axes('Parent',f);
          hold on, box on, axis equal
          xlabel('x')
          ylabel('y','Rotation',0)
          title('Compute the area of circles a vectorized way for several cicles')
          axis([0 20 0 20])
          rectangle('Position',[5,1,14,14])
           rectangle('Position',[3,1,2,2])
          rectangle('Position',[1,3,4,4])
           hold on, box on, axis equal
  
  
        a = 233;
        x_base_urban = randi([6 18], 1, a);
         b = rand([10 8], 1);
         y_base_urban = randi([2 14],1, a);
         r_base_urban = 0.9;
  
  
          size_x = size(x_base_urban);
          size_x = size_x(2);
          size_y = size(y_base_urban);
           size_y = size_y(2);
  
          colour = rand(size_x,3);
         for t = 1: size_x
           plot(x_base_urban(t)+ r_base_urban.*cos(0:2*pi/100:2*pi),...
          y_base_urban(t)+ r_base_urban.*sin(0:2*pi/100:2*pi),'parent',hAxs)
           plot(x_base_urban(t),y_base_urban(t),'+','parent',hAxs)
  
           end
  </code></pre>
  
  <p>Thanks</p>