开发者

Matlab how to show x,y coordinate

开发者 https://www.devze.com 2023-01-05 15:20 出处:网络
How to show both x,y coordinate mapped on image? x = 12; y = 54; plot(x,y,\'+ b\'); % this show only the \"+\" symbol. How to show the both coordinate and the \"+\"

How to show both x,y coordinate mapped on image?

    x = 12;
    y = 54;
    plot(x,y,'+ b'); % this show only the "+" symbol. How to show the both coordinate and the "+"

alt text http://www.fr开发者_如何转开发eeimagehosting.net/image.php?1dcb46de7a.jpg


This should do the trick (might need some adjustment of the coordinates):

text(x,y,['(', num2str(x), ', ', num2str(y), ')'])


you can use this code for displaying any data in the form of [x, y, f(x,y)] or data with coordinate https://www.mathworks.com/matlabcentral/fileexchange/72970-display-data-in-form-of-f-x-y-as-map-and-convert-to-matrix

0

精彩评论

暂无评论...
验证码 换一张
取 消