summaryrefslogtreecommitdiff
path: root/2939/CH1/EX1.3/Ex1_3.sce
blob: 1148e33e3e0d6c961aeb23bc563d1d949fbbb18f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Ex1_3

clc;
//Given:

energy=10; //in electron volts
m=9.1*10^-31;// mass of electron in kg
h=6.626*10^-34;// planck's constant J.s
c=3*10^8;// speed of light in m/s

//solution (a):
energy1=energy*1.6*10^-19;// energy in J
p=(2*m*energy1)^0.5;// momentum
wavelength=h/p*(10)^10;

printf("The wavelength in Angstroms is = %f ",wavelength)


//solution (b):
wavelength1=h*c/energy1*(10)^10;//photon wavelength

printf("\n The photon wavelength in Angstroms is = %f ",wavelength1)