MATLAB: Put axes in center of image

axesaxisimageimage processingimagesclimitsoriginplotxy

I have a 64×64 matrix 'img' that represents an image; I'm plotting with imagesc(img,clims). Right now both the x and y axes go from 0 to 64. I want to display the image with axes with the origin at the center of the image so that the x and y axes go from -32 to 32. How can I do this?
Thank you!

Best Answer

Read the doc and the examples...
x=[-32 32]; y=x;
imagesc(x,y,img,clims);