summaryrefslogtreecommitdiff
path: root/24/CH37/EX37.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH37/EX37.5
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '24/CH37/EX37.5')
-rwxr-xr-x24/CH37/EX37.5/Example37_5.sce30
-rwxr-xr-x24/CH37/EX37.5/Example37_5_result.txt8
2 files changed, 38 insertions, 0 deletions
diff --git a/24/CH37/EX37.5/Example37_5.sce b/24/CH37/EX37.5/Example37_5.sce
new file mode 100755
index 000000000..d161a2088
--- /dev/null
+++ b/24/CH37/EX37.5/Example37_5.sce
@@ -0,0 +1,30 @@
+exec('degree_rad.sci', -1)
+
+//Given that
+N = 1.26*10^4
+w = 25.4*10^-3 //in meter
+l1 = 589*10^-9 //in meter
+l2 = 589.59*10^-9 //in meter
+
+//Sample Problem 37-5a
+printf("**Sample Problem 37-5a**\n")
+d = w/N
+m = 1
+theta = asin(m*l1/d)
+theta = rtod(theta)
+printf("The first order maxima occurs at an angle of %fdegree from the center\n", theta)
+
+//Sample Problem 37-5b
+printf("\n**Sample Problem 37-5b**\n")
+theta = rtod(theta)
+D = m/(d*cos(theta))
+deltaL = l2-l1
+deltaTHETA = D*deltaL
+printf("The anglar sepration between the two first orderlines is %erad\n", deltaTHETA)
+
+//Sample Problem 37-5c
+printf("\n**Sample Problem 37-5c**\n")
+Lavg = (l1+l2)/2
+R = Lavg/(m*deltaL)
+N = R/m
+printf("The least number of rulings a grating can have is %d", N) \ No newline at end of file
diff --git a/24/CH37/EX37.5/Example37_5_result.txt b/24/CH37/EX37.5/Example37_5_result.txt
new file mode 100755
index 000000000..2927f4bb3
--- /dev/null
+++ b/24/CH37/EX37.5/Example37_5_result.txt
@@ -0,0 +1,8 @@
+**Sample Problem 37-5a**
+The first order maxima occurs at an angle of 16.988581degree from the center
+
+**Sample Problem 37-5b**
+The anglar sepration between the two first orderlines is 3.372079e-004rad
+
+**Sample Problem 37-5c**
+The least number of rulings a grating can have is 998 \ No newline at end of file