summaryrefslogtreecommitdiff
path: root/3204/CH18/EX18.5/Ex18_5.sce
blob: a71f5d6500a1849ad194fb2dcf91da264e01cf8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Initiization of variables
theta=30 // degrees // ange made by the ball against the wall
e=0.50
// Calculations
// The notations have been changed
// Resolving the velocity v as,
v_x=cosd(theta)
v_y=sind(theta)
V_y=v_y
// from coefficient of restitution reation
V_x=-e*v_x
// Resultant velocity
V=sqrt(V_x^2+V_y^2)
theta=atand(V_y/(-V_x)) // taking +ve value for V_x
// NOTE: Here all the terms are multiplied with velocity i.e (v).
// Results
clc
printf('The velocity of the ball is %f v \n',V)
printf('The direction of the ball is %f degrees \n',theta)