summaryrefslogtreecommitdiff
path: root/3753/CH7/EX7.7/Ex7_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '3753/CH7/EX7.7/Ex7_7.sce')
-rw-r--r--3753/CH7/EX7.7/Ex7_7.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3753/CH7/EX7.7/Ex7_7.sce b/3753/CH7/EX7.7/Ex7_7.sce
new file mode 100644
index 000000000..bb0f02f8b
--- /dev/null
+++ b/3753/CH7/EX7.7/Ex7_7.sce
@@ -0,0 +1,19 @@
+//Example number 7.7, Page number 7.15
+
+clc;clear;close
+
+// Variable declaration
+n=1 // unitless
+lamda=1.54// in m
+theta=32*%pi/180 // radian
+h=2// in m
+k=2// in m
+l=0// in m
+
+// Calculations
+d=(n*lamda*10^-10)/(2*sin(theta)) // derived from 2dsin(theta)=n*l
+a=d*(sqrt(h^2+k^2+l^2))//in m
+
+// Results
+printf("d = %.2e m",d)
+printf("\na = %.1e m",a)