title: RMSE of (x,y) coordinates
body: <p>I have a data set of coordinates (X,Y) values in the Cartesian plane and I would like to find the RMSE of these points to 1 coordinate (x1,y1).  So basically, (X,Y) are around (x1,y1) and I would like to find their RMSE.</p>
  
  <p>Could anyone help me because I'm not sure I'm doing this right:</p>
  
  <p>I'm doing this:</p>
  
  <pre><code>    Err = Err + sqrt[(X(i) - x1)^2 + (Y(i) - y1)^2]     - - - - Previous error + current error (Distance between points)
  
      RMSE = sqrt[(1/no_Of_Points)*Err^2]
  </code></pre>
  
  <p>Is this correct?</p>
  
  <p>I am doing this in MATLAB so feel free write code if you need.</p>
  
  <p>This is my code:</p>
  
  <pre><code>    RMSEright = 0;
      countright = 0;
  
      for i = 1:1:size(VarName1,1)
          [x,y] = pol2cart(VarName2(i,1), VarName1(i,1));
          if x &gt; 0
              RMSEright = RMSEright + (((featureright(1,1) - x)^2)+((featureright(1,2) - y)^2))^0.5;
              countright = countright + 1;
          end
      end
  
      RMSEright = ((1/countright)*RMSEright)^0.5
  </code></pre>
  
  <p>Thank you!</p>