summaryrefslogtreecommitdiff
path: root/3845/CH2/EX2.2/Ex2_2.sce
blob: d235907045da5d9f5b4d486bb9205b73a6e9daa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example 2.2
//See Figure 2.18
//Part a - motion towards right
x_0=4.70;//Initial position (km)
x_f=6.70;//Final position (km)
delta_x=x_f-x_0;//Displacement (km)
printf('Displacement in part (a) = %0.2f km',delta_x)
//Part b - motion towards left
x_0_prime=5.25;//Initial position (km)
x_f_prime=3.75;//Final position (km)
delta_x_prime=x_f_prime-x_0_prime;//Displacement (km)
printf('\nDisplacement in part (b) = %0.2f km',delta_x_prime)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest