如何给Matlab图像添加经纬度坐标

2025-04-13 16:56:49
推荐回答(1个)
回答1:

如下:
x=1+4*rand(1,5);
y=2+2*rand(1,5);
plot(x,y,'o-')
for i=1:length(x)
text(x(i),y(i),['(',num2str(x(i)),',',num2str(y(i)),')'])
%在(x,y)的每一点处添加文字,文字内容为(x,y)
%其中每一点的x,y用num2str把数字转化成字符串
end