blob: 16421021ac5dfbb8a988894c3f3b30c70c460f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//Initialisation of variables
clc
m=9.1*10^(-28)//mass on electron
e=4.8*10^(-10)//charge on electron
ev=1.6e-12//electron volt in ergs
v=10^9//cms/sec
E=0.5*m*v^2//energy in ergs
Ev=E/ev
printf('energy is %e ergs \n',E)
printf('energy is %f electron volt \n',Ev)
|