I have an image which I use to find circles using imfindcircles. This works fine however I need the index of the centers to be sorted from the bottom left to top right, column wise in the image. The grid is not uniform so I can't just sort the Y coordinates of centers matrix. How should I go about doing this? Thank you in advance.