Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Energy to Acclerate a Spaceship to Relativistic Speed
- % Determines the energy required to accelerate a spaceship and how many
- % missions are possible in a year
- % Constants
- c = 3.00*10^8; % [m/s] Speed of Light
- % Inputs and Variables
- M0 = input('Mass of spaceship\n');
- Beta = input('Speed of spaceship without c\n');
- K = input('Energy from the sun\n');
- eff = input('Efficiency in percent\n')*10^-2;
- % Outputs and Equations
- Work = M0*c^2*((1/sqrt(1-Beta^2))-1);
- missions = K*365*eff/Work;
- missions = floor(missions);
- fprintf('Energy required: %.3e J\nMissions: %f\n', Work, missions)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement