Selecting one channel out of many wireless channel based on max channel gain?
Ältere Kommentare anzeigen
Sir,
I have following code for selecting one channel out of 5 channels.
C0=10^-3; %path loss at refrence distance 1m.
K1=5; %devices in Group-1
d1=[8.5 9 8.0 9.5 10]; %set of all longest distances (d1>8) between HAP-WD in group-1
%d1 = 8 + (12-8).*rand(K1,1); %set of all longest distances between HAP-WD in group-1
n1=2+(4-2).*rand(K1,1); %path loss exponent between (2 and 4)
L1=C0.*(d1).^-n1; %Path-loss model HAP-WD in group-1
rng(0,'twister');
hhw1=max(sqrt(L1/2).*(randn(K1,1)+1i*randn(K1,1))); % HAP-WD group 1 K1*1 , max channel
this hhw1 produces 1*5 matrix, I have to chose only one out of these five values based on the maximum gain, How can I write this code in more efficient manner. Also how I can make d1 distance to be a random quantity but greator than 8 (One way which is commented is correct?)?
Thanks in anticipation.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!