How to cluster the users based on the minimum distance with respect to the base station.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have generated the code with respect to three users and computed the distance of three users with respect to the base station.
N_UE=3
Xmax=1; % x-coordinate for base station
Ymax=1; % y-coordinate for base station
radius=2; %coverage radius
xsd=ones(1,N_UE)*Xmax;
ysd=ones(1,N_UE)*Ymax;
rrx=radius*sqrt(rand(1,N_UE));
thetarx=2*pi*rand(1,N_UE);
ang=0:0.01:2*pi;
xrx=xsd+rrx.*cos(thetarx); %random position of receivers-->x-coordinate
yrx=ysd+rrx.*sin(thetarx); %random position of receivers-->x-coordinate
th = 0:pi/100:2*pi;
xunit = radius * cos(th) + Xmax;
yunit = radius * sin(th) + Ymax;
figure
plot(xunit, yunit);
hold on
plot(ysd,xsd,'r^')
hold on
PPP=[xrx.', yrx.'];
plot(PPP(:,1),PPP(:,2),'k*')
dist2=sqrt((xrx-xsd).^ 2+(yrx-ysd).^2)
The code executes and gives me the result.
As i am having three users the users can be clustered in 5 possible ways
{a},{b},{c}
{ab},{c}
{bc},{a}
{ac},{b}
{abc}.
the clustering needs to be done by computing the minimum difference in distance with respect to the base station.
Could anyone please help me on this.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Data Type Identification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!