summaryrefslogtreecommitdiff
path: root/3845/CH28/EX28.2/Ex28_2.sce
blob: d1b042c284e1e531dcd97f9cb489609780a1092d (plain)
1
2
3
4
5
6
7
8
9
10
//Example 28.2
L_0=4.3;//Distance between the Earth and Alpha Centauri as measured by an Earth-bound observer (ly)
Gamma=30;
L=L_0/Gamma;//Distance as measured by astronaut (ly)
printf('a.Distance between Earth and Alpha Centauri as measured by the astronaut = %0.4f ly',L)
//Rearranging Equation 28.24 and multiplying by (c/c) to get velocity in terms of c
v=sqrt((30^2-1)/30^2);//Velocity (in terms of c)
printf('\nb.Velocity of the astronaut relative to the Earth = %0.4fc',v)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest