summaryrefslogtreecommitdiff
path: root/3648/CH22/EX22.3/Ex22_3.sce
blob: c00f849aa650edf2d2f163f0ca9616b9c24aa5da (plain)
1
2
3
4
5
6
7
8
9
10
11
12

//Example 22_3
clc();
clear;
//To find the location of the image and its relative size
r=100            //Units in cm
d1=-r/2    //units in cm
d2=75     //units in cm
i=(d1*d2)/(d2-d1)   //Units in cm
p=75    //units in cm
sizee=-i/p           //units in cm
printf("The location of the image is i=%d cm\n The relative size of the image is I_O=%.2f cm",i,sizee)