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;

답변 (1개)

Ameer Hamza
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!

Translated by