I use this code to create sensor nodes in static WSN .... Is it Right?
Show older comments
set(gca,'XLim',[0 100]);
set(gca,'YLim',[0 100]);
hold on;
BS=plot(50,90,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(49,90,'BS','FontSize',8);
hold on;
CH1= plot(25,60,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(24,60,'CH1','FontSize',8);
CH2= plot(75,60,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(74,60,'CH2','FontSize',8);
SN1= plot(15,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(14,30,'SN1','FontSize',8);
SN2=plot(25,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(24,30,'SN2','FontSize',8);
SN3=plot(35,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(34,30,'SN3','FontSize',8);
SN4=plot(65,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(64,30,'SN4','FontSize',8);
SN5=plot(75,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(74,30,'SN5','FontSize',8);
SN6= plot(85,30,'^','LineWidth',1,...
'MarkerEdgeColor','g',...
'MarkerFaceColor','Y',...
'MarkerSize',30) ;
hold on;
text(84,30,'SN6','FontSize',8);
1 Comment
Kuldeep Derashri
on 17 Jan 2018
Accepted Answer
More Answers (0)
Categories
Find more on WSNs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!