summaryrefslogtreecommitdiff
path: root/3542/CH9/EX9.6/Ex9_6.sce
blob: 856823f85b979bef019f010b7218e0f1b048c382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Example no 9.6
// To determine the maximum throughput using ALOHA and slotted ALOHA
// Page no. 466

clc;
clear all;

//The maximum throughput using ALOHA
Rmax=1/2;                                            //Maximum rate of arrival calculated by equating ALOHA throughput formula derivative to zero
T=Rmax*exp(-1);                                      //The maximum throughput using ALOHA

// Displaying the result in command window
printf('\n The maximum throughput using ALOHA = %0.4f',T);

//The maximum throughput using slotted ALOHA
Rmax=1;                                              //Maximum rate of arrival calculated by equating slotted ALOHA throughput formula derivative to zero
T=Rmax*exp(-1);                                      //The maximum throughput using slotted ALOHA

// Displaying the result in command window
printf('\n The maximum throughput using slotted ALOHA = %0.4f',T);