Matlab如何显示x,y坐标

时间:2010-07-05 23:19:48

标签: matlab plot

如何在图像上显示x,y坐标?

    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.freeimagehosting.net/image.php?1dcb46de7a.jpg

2 个答案:

答案 0 :(得分:1)

这应该可以解决问题(可能需要对坐标进行一些调整):

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

答案 1 :(得分:-1)

您可以使用此代码显示[x,y,f(x,y)]形式的任何数据或具有坐标的数据 https://www.mathworks.com/matlabcentral/fileexchange/72970-display-data-in-form-of-f-x-y-as-map-and-convert-to-matrix

相关问题