W&MC Lab No-5

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

LAB NO-5:

REUSE FREQUENCY FOR CELLULAR SYSTEMS


SOLUTION:

TASK NO-1:
SOLUTION:
MATLAB CODE:
clc;
clear all;

%FOR RADIUS:
R = input('enter the radius = ');
%FOR REUSE DISTANCE;
D = input('enter the reuse distance = ');

%FOR NUMBER OF CELLS:


N = (D.*D)/(3*(R.*R));

%FOR AREA:
area = N*pi*R;
disp('number of cells = ');
disp(N);
disp('area');
disp(prettify(area));

%FOR PLOT
plot(D,N,'-*')

OUTPUT:
enter the radius = 1800
enter the reuse distance = 20000:1000:30000
number of cells =
Columns 1 through 8
41.1523 45.3704 49.7942 54.4239 59.2593 64.3004 69.5473 75.0000

Columns 9 through 11

80.6584 86.5226 92.5926


area
232710.5669 256563.4 281579.786 307759.7248 335103.2164 363610.2608 393280.8581
424115.0082 456112.7112 489273.967 523598.7756

>>
TASK NO-2:
SOLUTION:
MATLAB CODE:
clc;
clear all;

%$FOR NO OF TIMES REPLICATED:


M = input('no of times replicated = ');
%FOR NO OF CHANNELS IN NETWORK:
K = input('Channels in a network = ');
%FOR NO OF CELLS;
N = input('no of cells = ');

%FOR CHANNEL CAPACITY:


S = K*N;
C = M*S;
disp(C);
OUTPUT:
no of times replicated = 6
Channels in a network = 5
no of cells = 13
390
PART B:
MATLAB CODE:
clc;
clear all;

%$FOR NO OF TIMES REPLICATED:


M = input('no of times replicated = ');
%FOR NO OF CHANNELS IN NETWORK:
K = input('Channels in a network = ');
%FOR NO OF CELLS;
N = input('no of cells = ');

%FOR CHANNEL CAPACITY:


S = K*N;
C = M*S;
disp(C);

%FOR NO OF CELLS;
N = 5:5:30;
C = (M*K).*N;
bar(N,C)

OUTPUT:
TASK NO-3:
SOLUTION:
PART A:
MATLAB CODE:
clc;
clear all;

%FOR TOTAL BANDWIDTH:


TB = 33*10^(6);

%FOR CHANNEL BANDWIDTH:


CB = 25*10^(3);

%FROM SIMPLEX TO DUPLEX:


CB = 2*CB;

disp('finding no of channels')
nc = TB/CB;

disp(['no of total channels are = ', num2str(nc)]);


while 1;
N = input('enter cell reuse = ');
c = nc/N;
x = ['total no of channels with cell reuse = ',num2str(N),' &
',num2str(c)];
disp(x);
end

OUTPUT:
finding no of channels
no of total channels are = 660
enter cell reuse = 4
total no of channels with cell reuse = 4 & 165
PART B:
MATLAB CODE:
clc;
clear all;

%FOR TOTAL BANDWIDTH:


TB = 33*10^(6);

%FOR CHANNEL BANDWIDTH:


CB = 25*10^(3);

%FROM SIMPLEX TO DUPLEX:


CB = 2*CB;

disp('finding no of channels')
nc = TB/CB;

disp(['no of total channels are = ', num2str(nc)]);


while 1;
N = input('enter cell reuse = ');
c = nc/N;
x = ['total no of channels with cell reuse = ',num2str(N),' &
',num2str(c)];
disp(x);
end

OUTPUT:
finding no of channels
no of total channels are = 660
enter cell reuse = 7
total no of channels with cell reuse = 7 & 94.2857

PART C:
MATLAB CODE:
clc;
clear all;

%FOR TOTAL BANDWIDTH:


TB = 33*10^(6);

%FOR CHANNEL BANDWIDTH:


CB = 25*10^(3);

%FROM SIMPLEX TO DUPLEX:


CB = 2*CB;
disp('finding no of channels')
nc = TB/CB;

disp(['no of total channels are = ', num2str(nc)]);


while 1;
N = input('enter cell reuse = ');
c = nc/N;
x = ['total no of channels with cell reuse = ',num2str(N),' &
',num2str(c)];
disp(x);
end
OUTPUT:
finding no of channels
no of total channels are = 660
enter cell reuse = 12
total no of channels with cell reuse = 12 & 55
TASK NO-4:
SOLUTION:
PART A:
MATLAN CODE:
clc;
clear all;

%FOR NO OF CELLS IN CLUSTER:


N = 16;

%FOR DITANCE VALUES OF "I" FROM " 3 TO 10 KM":


for i = 3000:1000:10000
j((i/1000)-2) = 1/2*(-i- sqrt(3+4*N));
end

%FOR PRINTING VALUES:


fprintf('The values are = [ ');
fprintf('%g, ',j(1:end-1));
fprintf('%g]/n ',j(end));

OUTPUT:
The values are = [ -1504.09, -2004.09, -2504.09, -3004.09, -3504.09, -4004.09, -4504.09, -
5004.09]/n >>
PART B:
MATLAN CODE:
clc;
clear all;

%FOR NO OF CELLS IN CLUSTER:


N = 16;

%FOR DITANCE VALUES OF "I" FROM " 3 TO 10 KM":


for j = 3000:1000:10000
i((j/1000)-2) = 1/2*(-j- sqrt(3+4*N));
end

%FOR PRINTING VALUES:


fprintf('The values are = [ ');
fprintf('%g, ',i(1:end-1));
fprintf('%g]/n ',i(end));

OUTPUT:
The values are = [ -1504.09, -2004.09, -2504.09, -3004.09, -3504.09, -4004.09, -4504.09, -
5004.09]/n >>

CONCLUSION:

You might also like