summaryrefslogtreecommitdiff
path: root/3710/CH5/EX5.1/Ex5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3710/CH5/EX5.1/Ex5_1.sce')
-rw-r--r--3710/CH5/EX5.1/Ex5_1.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/3710/CH5/EX5.1/Ex5_1.sce b/3710/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..60bc96751
--- /dev/null
+++ b/3710/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,11 @@
+//Example 5.1, Page Number 173
+//The Function fpround(dependency) is used to round a floating point number x to n decimal places
+clc;
+T=2000 // In Kelvin
+v=5*(10**14) //Frequency In Hertz
+h=6.6*(10**-34) //Plancks Constant
+k=1.38*(10**-23) //Boltzman Constant
+
+R=exp((h*v)/(k*T))-1
+R=fpround(R,2)
+mprintf("The Ratio of rates of spontaneous & stimulated emission is %0.2e",R);