Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can i connect these points that is basically act as transmitter and receiver. To connect one X with * individually

1 Ansicht (letzte 30 Tage)
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;

Antworten (1)

Ameer Hamza
Ameer Hamza am 23 Sep. 2020
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