Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How can i connect these points that is basically act as transmitter and receiver. To connect one X with * individually
1 回表示 (過去 30 日間)
古いコメントを表示
x_r = xx;
y_r = yy;
for i = 1 : length(x_r)
x_r(i) = x_r(i) + 35*rand();
end
for i = 1 : length(y_r)
y_r(i) = y_r(i) + 35*rand();
end
scatter(xx,yy,'X'); %Transmitter denoted by X
xlabel('x');
ylabel('y');
axis square;
hold on;
scatter(x_r,y_r,'*','r') %Receiver denoted by Red *
xlabel('x');
ylabel('y');
axis square;
0 件のコメント
回答 (1 件)
Ameer Hamza
2020 年 9 月 23 日
Something like this
xx = 1000*rand(1, 100) - 500;
yy = 1000*rand(1, 100) - 500;
xr = xx + 30*rand(size(xx));
yr = yy + 30*rand(size(yy));
scatter(xx, yy, 'r*');
hold on
scatter(xr, yr, 'b+');
plot([xx; xr], [yy; yr], 'm', 'LineWidth', 1);
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!