Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Mass and Energies of a Relativistic Particle
- % Determines the mass, rest energy, kinetic energy, and total energy of a
- % particle
- % Constants
- c = 3.00*10^8; % [m/s] Speed of Light
- % Inputs and Variables
- Beta = input('Particle speed without c\n');
- p = input('Momentum of particle in kg*m/s\n');
- % Outputs and Equations
- M0 = p*sqrt(1-Beta^2)/(Beta*c);
- E0 = M0*c^2;
- E = p*c/Beta;
- K = E-E0;
- fprintf(['Mass: %.3e kg\n'...
- 'Rest energy: %.3e J\n'...
- 'Kinetic energy: %.3e J\n'...
- 'Total energy: %.3e J\n'],M0,E0,K,E)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement