summaryrefslogtreecommitdiff
path: root/1026/CH8/EX8.16/Example8_16.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1026/CH8/EX8.16/Example8_16.sce
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1026/CH8/EX8.16/Example8_16.sce')
-rwxr-xr-x1026/CH8/EX8.16/Example8_16.sce55
1 files changed, 27 insertions, 28 deletions
diff --git a/1026/CH8/EX8.16/Example8_16.sce b/1026/CH8/EX8.16/Example8_16.sce
index 955ff3493..227d5ecda 100755
--- a/1026/CH8/EX8.16/Example8_16.sce
+++ b/1026/CH8/EX8.16/Example8_16.sce
@@ -1,29 +1,28 @@
-//chapter8,Example8_16,pg 209
-
-n=2
-
-grat=1/5000//transmission grating
-
-lam=5893*10^-8
-
-dtheta=(2.5*3.14)/(180*60)//change in angular displacement(in radian)
-
-//(a+b)=grat
-
-//dlam=((a+b)cos(theta)/n)dtheta
-
-cos(theta)=sqrt(1-(((n*lam)/grat)^2))
-
-dlam=(dtheta*grat*cos(theta))/n//difference in wavelength
-
-f=30//focal length
-
-dl=f*dtheta//linear separation
-
-printf("difference between two yellow lines (in cm)\n")
-
-disp(dlam)
-
-printf("\nlinear separation\n")
-
+//chapter8,Example8_16,pg 209
+
+n=2
+
+grat=1/5000//transmission grating
+
+lam=5893*10^-8
+
+dtheta=(2.5*3.14)/(180*60)//change in angular displacement(in radian)
+
+//(a+b)=grat
+
+//dlam=((a+b)cos(theta)/n)dtheta
+
+theta=acos(sqrt(1-(((n*lam)/grat)^2)))
+dlam=(dtheta*grat*cos(theta))/n//difference in wavelength
+
+f=30//focal length
+
+dl=f*dtheta//linear separation
+
+printf("difference between two yellow lines (in cm)\n")
+
+disp(dlam)
+
+printf("\nlinear separation\n")
+
printf("dl=%.4f cm",dl) \ No newline at end of file