필터 지우기
필터 지우기

How to randomly generate 10 user locations from a two base stations

조회 수: 1 (최근 30일)
Mohammed Hadi
Mohammed Hadi 2018년 9월 27일
Let's say we have two base stations, the distance between them is 1200 meters, the users are located around them in a distance ranging from 300-600 meters. I need to locate 10 users among those two base stations in a 300-600 distance and I wrote the code below for that purpose. However, this code randomly-allocates the users but doesn't consider that the distance (Euclidian distance if I am right) should be between 600-1800 meters from BS1, nor it gives its exact distance from BS1 (located on the left)
NOBS=2; % Number of Base stations
for ZZ=1:NOBS
NOU=10; % number of users
d=randi([300 600],NOU,1); % generating 10 BS- UE distances ranging from 300 to 600 meters
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by