-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