フィルターのクリア

Circles of different radius around random points

2 ビュー (過去 30 日間)
Simran Sandhu
Simran Sandhu 2019 年 4 月 25 日
コメント済み: Jan 2019 年 11 月 24 日
Below is the code and i want to create circle for the new bts location, circle is of radius 0.3kms
% points of interest
P = rand(2, 3);
P1= rand(2, 3);
P2= rand(2, 3);
% Candidate feature set
X = rand(2,20);
X1= rand (2,20);
X2= rand (2,20);
I = nearestneighbour(P, X, 'Radius', 0.3);
I1 = nearestneighbour(P1, X1, 'Radius', 0.3);
I2 = nearestneighbour(P2, X2, 'Radius', 0.3);
figure;
idx = I(I(:, 1) ~= 0, 1);
plot(P(1,:), P(2, :), 'r.', X(1,:), X(2,:), 'b.', 'MarkerSize', 15)
hold on
p1 = repmat(P(1,1), 1, length(idx)); p2 = repmat(P(2,1), 1, length(idx));
quiver(p1, p2, X(1, idx) - p1, X(2, idx) - p2, 0, 'k')
hold on
idx = I1(I1(:, 1) ~= 0, 1);
plot(P1(1,:), P1(2, :), 'r.', X1(1,:), X1(2,:), 'b.', 'MarkerSize', 15)
hold on
p1 = repmat(P1(1,1), 1, length(idx)); p2 = repmat(P1(2,1), 1, length(idx));
quiver(p1, p2, X1(1, idx) - p1, X1(2, idx) - p2, 0, 'k')
hold on
idx = I2(I2(:, 1) ~= 0, 1);
plot(P2(1,:), P2(2, :), 'r.', X2(1,:), X2(2,:), 'b.', 'MarkerSize', 15)
hold on
p1 = repmat(P2(1,1), 1, length(idx)); p2 = repmat(P2(2,1), 1, length(idx));
quiver(p1, p2, X1(1, idx) - p1, X2(2, idx) - p2, 0, 'k')
hold off
xlabel('x distance (km)')
ylabel('y distance (km)')
legend('new BTS coverage= 0.3kms','users')
  5 件のコメント
YASIR YASH
YASIR YASH 2019 年 11 月 24 日
sir help me to write code for random users around one BTS
Jan
Jan 2019 年 11 月 24 日
@YASIR YASH: Please open a new thread and explain your problem with details.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by