how to plot node in particular range but x and y lim is 1000x1000
1 次查看(过去 30 天)
显示 更早的评论
bs=4;
area=1000;
X_coord=rand(1,bs)*area
Y_coord=rand(1,bs)*area
if ((X_coord<=100)&(X_coord>=880))
X_coord=rand(1)*area
end
if ((Y_coord<=100)&(Y_coord>=880))
Y_coord=rand(1)*area
end
for i2=1:bs
plot(X_coord(i2),Y_coord(i2),':o','LineWidth',3,'MarkerEdgeColor','k','MarkerFaceColor',...[0.5,0.5,0.5],'MarkerSize',3)
text(X_coord(i2),Y_coord(i2),'BS')
hold on
end
In above coding i need some solution if X_coord and Y_coord value is less than 100 and gteater than 880 shown in 3 and 4 line of above code, then it will again calculate particular X_coord and Y_coord value for ploting
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!