summaryrefslogtreecommitdiff
path: root/2409/CH10/EX10.1/Ex10_1.sce
blob: ca7a80f60d569b6ad6c0af6689d9843acd026c33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

funcprot(0)

//Variable Declaration
PR=0.01  //The Average power received(watts)
Tb=0.0001  //Bit period(seconds)
N0=10**-7  //Noise power(joule)

//Calculations
Eb=PR*Tb  //Energy per bit received (joule)
x=sqrt(Eb/N0)


erf=integrate("exp(-t^2)","t",0,x)
erf1=erf*(2/%pi**0.5)
BER=(1-erf1)*(10**6)/2

printf("The Bit error rate is %.1f * 10^-6", BER)