Matlab-图像点上标序号


x=rand(10,1)*10; 

y=rand(10,1)*10; %x,y表示任意10个点的坐标

plot(x,y,'*');

for i=1:10

    text(x(i)+0.01,y(i)+0.01,num2str(i)) ; %加上0.01使标号和点不重合,可以调整

end

猜你喜欢

转载自blog.csdn.net/qq_41093189/article/details/81208441