I am trying to gat the x,y coordinate of the image I loaded in axes by clicking the mouse. I've seen a few answers, such as this one MATLAB how to get mouse click coordinates My questions is where(under which function?) should I put the
imageHandle = imshow(imageObj);
as well as
set(imageHandle,'ButtonDownFcn',@ImageClickCallback);
Sorry for this naive question, Thanks!