summaryrefslogtreecommitdiff
path: root/1655/CH8/EX8.11.1/Example_8_11_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '1655/CH8/EX8.11.1/Example_8_11_1.sce')
-rwxr-xr-x1655/CH8/EX8.11.1/Example_8_11_1.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/1655/CH8/EX8.11.1/Example_8_11_1.sce b/1655/CH8/EX8.11.1/Example_8_11_1.sce
new file mode 100755
index 000000000..a3c7c21a3
--- /dev/null
+++ b/1655/CH8/EX8.11.1/Example_8_11_1.sce
@@ -0,0 +1,10 @@
+// Example 8.11.1 page 8.26
+
+clc;
+clear;
+
+P=1d-9; //probability of error
+eta=1;
+N= -log(P);
+N1=round(N);
+printf("Thus %.1f or %d photons are required for maintaining 10^-9 BER.\nAssuming eta=1;\nE=%.1f*hv.",N,N1,N);