summaryrefslogtreecommitdiff
path: root/3648/CH22/EX22.8/Ex22_8.sce
blob: 04b6fca6580a05fc96cd8acfbbd47f2ac40a0b84 (plain)
1
2
3
4
5
6
7
8
9
10
11
//Example 22_8
clc();
clear;
//To find the image positon and size
d1=-20    //units in cm
d2=40     //units in cm
i=(d1*d2)/(d2-d1)   //Units in cm
printf("\nThe image is located at i=%.2f cm",i)
d3=3          //units in cm
I=(-i*d3)/d2   //units in cm
printf("\nThe Size of the image is I=%d cm",I)