MATLAB Puzzler: Finding the two closest points
    Here is a new MATLAB Puzzler.
 
 Given two vectors representing the X and Y coordinates of some points, find the two closest points in Cartesian space.
 
 
 n = 10;
 x = rand(1,n);
 y = rand(1,n);
 
 
  

 
                
               
               
               
              
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.