Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Spaceship at Relativistic Speed
- % Determines the speed of the spacefhip in terms of the speed of light and
- % how much time it takes to cook something in the oven
- % Constants
- c = 3.00*10^8; % [m/s] Speed of Light
- % Inputs and Variables
- L0 = input('Spaceship length at rest\n');
- L = input('Spaceship length when moving\n');
- t = input('Time for oven\n');
- % Outputs and Equations
- Beta = sqrt(1-(L/L0)^2);
- T = t/sqrt(1-Beta^2);
- fprintf('Speed of the spaceship: %.3f\nTime: %.3f Hours', Beta, T)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement