summaryrefslogtreecommitdiff
path: root/2912/CH4/EX4.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2912/CH4/EX4.1
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 '2912/CH4/EX4.1')
-rwxr-xr-x2912/CH4/EX4.1/Ex4_1.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/2912/CH4/EX4.1/Ex4_1.sce b/2912/CH4/EX4.1/Ex4_1.sce
new file mode 100755
index 000000000..b3c8358be
--- /dev/null
+++ b/2912/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,18 @@
+//chapter 4
+//example 4.1
+//Find spacing constant
+//page 75
+clear;
+clc;
+//given
+lambda=2.6; // in Angstrom (wavelength)
+theta=20; // in Degree (angle)
+n=2;
+//calculate
+lambda=lambda*1E-10; // since lambda is in Angstrom
+// Since 2dsin(theta)=n(lambda)
+// therefore d=n(lambda)/2sin(theta)
+d=n*lambda/(2*sind(theta));
+printf('\nThe spacing constant is \td=%1.1E m',d);
+d=d*1E10; // changing unit from m to Angstrom
+printf('\n\t\t\t\td=%.1f Angstrom',d);