blob: fb164f333928a0433530d33f154eb278a2b0a52a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//Example 2.7
//See Figure 2.22
v_0=-20;//Initial velocity (km/h)
v_f=0;//Final velocity (km/h)
delta_t=10;//Time period (s)
delta_v=v_f-v_0;//Change in velocity (km/h)
delta_v=delta_v*10^3/3600;//Change in velocity (m/s)
a=delta_v/delta_t;//Acceleration (m/s^2)
printf('Average acceleration = %0.3f m/s^2',a)
//Acceleration is positive as it is directed to the right
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|