MATLAB: Extract y coordinates of centriod of an image

centroidcoordinatesimage processingImage Processing Toolboxvideo processingyaxis

I have found the x and y co-ordinates of centroid of an image. I need to extract only the y-axis value and plot it against x=1:1:10. How can I extract the why axis value?
Code to find the centroid is in the comment below. Thanks

Best Answer

The y value for index x is stat1(x).Centroid(2).