point=[1.8 3.1 4.3 3.5 2; 3.4 4.9 3 1.1 1.8];
centroid=[2.94; 2.84];
UnknownNode=[3.14; 3.04];
plot(point(1,:),point(2,:),'b^')
hold on
plot(centroid(1),centroid(2),'ro')
hold on
plot(UnknownNode(1),UnknownNode(2),'m*');
hold on
M=['A_1','B','C','D','E']
text(point(1,:)+0.1,point(2,:)+0.1,[M(:)],'color','b')
hold on
text(UnknownNode(1,1)+0.1,UnknownNode(2,1)+0.1,'S','color','m')
hold on
text(centroid(1,1)+0.1,centroid(2,1)-0.1,'Centroid','color','r')
hold on
xlim([0,6]);
ylim([0,6]);
axis off
legend('BeaconNode','Centroid','UnknownNode');
matlab画图,在图中标出字母
最新推荐文章于 2023-11-09 08:11:37 发布