blob: e75927ab7194d26df8fc6ab318045a62d931fc93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc
clear
//input from given graph
//calculation of initial accleration
ia=18/4
// calculation of final accleration
fa=-18/10
decel=-(fa)//calculation of deceleration
//calculation of total distance covered
d=0.5*(4*18)+(8*18)+0.5*(10*18)//area under velocity time graph
//output
printf("\n the initial acceleration is %3.3f m/s^2",ia)
printf("\n the final acceleration is %3.3f m/s^2",decel)
printf("\n the distance covered is is %3.3f m",d)
|