Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Spaceship Equipped With a Proton Cannon
- % Determines the velocity of protons in a resting frame of a movie and in
- % the backward direction
- % Inputs and Variables
- U = input('Ship speed\n');
- Uprime = input('Proton cannon speed\n');
- % Outputs and Equations
- BetaForward = (U+Uprime)/(1+U*Uprime);
- BetaBackward = (U-Uprime)/(1+U*-Uprime);
- fprintf('Velocity forward: %.4f\nVelocity backward: %.4f\n',BetaForward,BetaBackward)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement