summaryrefslogtreecommitdiff
path: root/1163/CH12/EX12.2/example_12_2.sce
blob: 51eebe76c120fcf67363bd21db86bce4f72811c6 (plain)
1
2
3
4
5
6
7
8
clear;
clc;
disp("--------------Example 12.2---------------")
frame_bits=200; 
datarate=200*10^3; // 200 kbps
Tfr=frame_bits/datarate;
Tv=2*Tfr; // vulnerable time
printf("The Tfr is %d ms and the vulnerable time is %d ms.\nThis means no station should send later than %d ms before this station starts transmission\nand no station should start sending during the one %d ms period that this station is sending.",Tfr*10^3,Tv*10^3,Tfr*10^3,Tfr*10^3); // display results with appropriate units