diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3669/CH14/EX14.2/2.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3669/CH14/EX14.2/2.sce')
-rw-r--r-- | 3669/CH14/EX14.2/2.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/3669/CH14/EX14.2/2.sce b/3669/CH14/EX14.2/2.sce new file mode 100644 index 000000000..7c4f60457 --- /dev/null +++ b/3669/CH14/EX14.2/2.sce @@ -0,0 +1,25 @@ +
+//Variable declaration
+lamda=5460*10**-10; //wavelength(m)
+d=1*10**-4; //seperation(m)
+D=2; //distance(m)
+n=10; //position
+
+//Calculation
+Xmax10=n*lamda*D/d;
+tan_phi=Xmax10/D;
+phi_max10=atan(tan_phi);
+phi_max10=phi_max10*180/%pi; //angular position of 10th maximum(degrees)
+phim=60*(phi_max10-int(phi_max10));
+phis=60*(phim-int(phim));
+xmin1=lamda*D/(2*d);
+tan_phi1=xmin1/D;
+phi_min1=atan(tan_phi1);
+phi_min1=phi_min1*180/%pi; //angular position of 1st minimum(degrees)
+phi_m=60*(phi_min1-int(phi_min1));
+phi_s=60*(phi_m-int(phi_m));
+
+//Result
+printf('angular position of 10th maximum is %0.3f degrees %0.3f minutes %0.3f seconds \n',int(phi_max10),int(phim),(phis))
+printf('answer varies due to approximating off errors\n')
+printf('angular position of 1st minimum is %0.3f degrees %0.3f minutes %0.3f seconds \n',int(phi_min1),int(phi_m),int(phi_s))
\ No newline at end of file |