Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Punch and Judy
- % Determines the speed of a rocket seen on earth
- % Constants
- c = 3.00*10^8; % [m/s] Speed of Light
- % Inputs and Variables
- Vp = input('Speed punch sees\n');
- Vj = input('Judy''s speed\n');
- % Outputs and Equations
- v = (Vp-Vj)/(1-Vp*Vj);
- fprintf('Speed of the rocket seen by judy: %.3f\n',v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement