how to plot node in particular range but x and y lim is 1000x1000
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Data Exploration 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!