summaryrefslogtreecommitdiff
path: root/1871/CH3/EX3.5/Ch03Ex5.sce
diff options
context:
space:
mode:
Diffstat (limited to '1871/CH3/EX3.5/Ch03Ex5.sce')
-rwxr-xr-x1871/CH3/EX3.5/Ch03Ex5.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/1871/CH3/EX3.5/Ch03Ex5.sce b/1871/CH3/EX3.5/Ch03Ex5.sce
new file mode 100755
index 000000000..acfba2691
--- /dev/null
+++ b/1871/CH3/EX3.5/Ch03Ex5.sce
@@ -0,0 +1,13 @@
+// Scilab code Ex3.5 : Pg:98 (2008)
+clc;clear;
+d = 10; // Distance of separation of two lenses, cm
+// As 2*f1 = d, solving for f1
+f1 = d/2; // Focal length of the first plano-convex lens, cm
+f2 = 3*f1; // Focal length of the second plano-convex lens, cm
+F = f1*f2/(f1 + f2 - d); // Focal length of the eye-piece, cm
+printf("\nThe focal lengths of the plano-convex lenses are %1.0f cm and %2.0f cm", f1, f2);
+printf("\nThe focal length of the eye-piece = %3.1f cm", F);
+
+// Result
+// The focal lengths of the plano-convex lenses are 5 cm and 15 cm
+// The focal length of the eye-piece = 7.5 cm \ No newline at end of file