summaryrefslogtreecommitdiff
path: root/1985/CH3/EX3.5/Chapter3_Example5.sce
blob: aa41d1668878d17c845d6e324cfbfdfc0576d580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

clc
clear

//INPUT
T=2;//Time on earth in years
t=1;//Time on satilite in years
c=3*10^8;//Speed of light in  m/s

//CALCULATIONS
v=c*sqrt(1-(t^2/T^2))/10^8//Velocity in m/s

//OUTPUT
mprintf('The speed of the rocket is %5.3f*10^8 m/s',v )