Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Relativistic Electric
- % Determines how many times the kinetic energy of the electron is larger
- % than the rest of its energy,the KE of the electron, the speed of the
- % electron in terms of the speed of light, and the momentum of the electron
- % measure in MeV/c
- format long
- % Constants
- M0c2 = 0.511; % [MeV] Rest energy of electron
- c = 3.00*10^8; % [m/s] Speed of Light
- % Inputs and Variables
- E = input('Times total energy to rest energy\n');
- % Outputs and Equations
- K = E-1;
- KE = K*M0c2;
- Beta = sqrt(E^2-1)/E;
- p = E*M0c2;
- fprintf(['Kinetic energy is %.0fx rest energy\n'...
- 'Kinetic energy: %.3e MeV\n'...
- 'Speed of electrons %.9f\n'...
- 'Momentum in MeV/c: %.3e\n'],K,KE,Beta,p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement