title: Add centroid to plot - Matlab
body: <p>In the following script I get the coordinates of and coins in an image, later they are plotted. How can I also add to the plot the centroid  calculated using stat (in red, marked as X)?</p>
  
  <p>Script:</p>
  
  <pre><code>clc;
  clear;
  I = imread('coins.png');
  imshow(I)
  BW = im2bw(I);
  
  
  BW_filled = imfill(BW,'holes');
  stat = regionprops(BW_filled,'centroid');
  boundaries = bwboundaries(BW_filled);
  
  for k=1:10
      b = boundaries{k};
      plot(b(:,2),b(:,1),'g','LineWidth',3);
      hold on;
  end
  </code></pre>