summaryrefslogtreecommitdiff
path: root/2411/CH3/EX3.d.305/Ex3d_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '2411/CH3/EX3.d.305/Ex3d_5.sce')
-rwxr-xr-x2411/CH3/EX3.d.305/Ex3d_5.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/2411/CH3/EX3.d.305/Ex3d_5.sce b/2411/CH3/EX3.d.305/Ex3d_5.sce
new file mode 100755
index 000000000..976a0f982
--- /dev/null
+++ b/2411/CH3/EX3.d.305/Ex3d_5.sce
@@ -0,0 +1,11 @@
+// Scilab Code Ex3d.5: Page-207 (2008)
+clc; clear;
+N = 4250; // Number of lines per cm of grating, lines/cm
+a_plus_b = 1/N; // Grating element, cm
+n = 2; // Order of diffraction
+theta = 30; // Angle of diffraction, degree
+lambda = sind(theta)*a_plus_b/n; // Wavelength of spectral line from diffraction condition, cm
+printf("\nThe wavelength of spectral line from diffraction condition = %4d angstrom", lambda/1e-008);
+
+// Result
+// The wavelength of spectral line from diffraction condition = 5882 angstrom \ No newline at end of file