-3
我想计算出用户的位置,接入点和基站如何计算点之间的距离?
figure('Color', 'white')
UserLocationX = randi(50, 1, 50);
UserLocationY = randi(50, 1, 50);
plot(UserLocationX, UserLocationY, '^-', 'MarkerSize', 5, 'LineWidth', 2), hold on
AccessPointX = randi(50, 1, 8);
AccessPointY = randi(50, 1, 8);
plot(AccessPointX, AccessPointY, 'go', 'MarkerSize', 5, 'LineWidth', 6), hold on
BaseStationX = 25;
BaseStationY = 25;
plot(BaseStationX, BaseStationY, 'rs', 'MarkerSize', 5, 'LineWidth', 6), hold on, grid on
leg = legend('User Location', 'Access Point', 'Base Station');
set(leg, 'Location', 'NorthEastOutside')
xlabel('x-candidate')
ylabel('y-candidate')
title('Scenario')
在用户与基站之间,基站与基站之间,还是用户与基站之间? –
用户和BS之间,用户和AP之间 – user3087700
我改变了标题。 “如何编写Matlab代码”相当广泛;) – thewaywewalk