查看单个帖子
旧 2019-12-10, 20:42   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 Matlab如何显示x,y坐标

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

x = 12; y = 54; plot(x,y,'+ b'); % this show only the "+" symbol. How to show the both coordinate and the "+" 替代文字http://www.freeimagehosting.net/image.php?1dcb46de7a.jpg



回答:

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

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

更多&回答...
poster 当前离线   回复时引用此帖