summaryrefslogtreecommitdiff
path: root/3753/CH4/EX4.3/Ex4_3.sce
blob: 39f301bb5c8ca377d09986e28c13dc77a691df03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Example 4.3, Page number 4.32

clc;clear;close

// variable declaration
C=3*10**8                     // Velocity of light m/s
W=632.8*10**-9                // wavelength in m
P=2.3 
t=1
h=6.626*10**-34              // Planck constant 
S=1*10**-6

// Calculations
V=C/W                        // Frequency
n=((P*10**-3)*t)/(h*V)       // no.of photons emitted
PD=P*10**-3/S                // Power density

// Result
printf("Frequency = %0.2e Hz",V)
printf("\nno.of photons emitted = %0.2e photons/sec",n)
printf("\nPower density = %0.1f kWm^-2",(PD/1000))