blob: 5360e92cc0389a7f530b0d40d878dead13782616 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Scilab Code Ex8.9: Page-174 (2010)
c = 1; // For simplicity assume speed of light to be unity, m/s
m0 = 1; // For simplicity assume rest mass to be unity, kg
m = (20/100+1)*m0; // Mass in motion, kg
// As m = m0/sqrt(1-(u/c)^2), solving for u
u = sqrt(1-(m0/m)^2)*c; // Speed of moving mass, m/s
printf("\nThe speed of moving body, u = %5.3fc", u);
// Result
// The speed of moving body, u = 0.553c
|