From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 3204/CH18/EX18.1/Ex18_1.sce | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 3204/CH18/EX18.1/Ex18_1.sce (limited to '3204/CH18/EX18.1') diff --git a/3204/CH18/EX18.1/Ex18_1.sce b/3204/CH18/EX18.1/Ex18_1.sce new file mode 100644 index 000000000..3f8d861f8 --- /dev/null +++ b/3204/CH18/EX18.1/Ex18_1.sce @@ -0,0 +1,15 @@ +// Initilization of variables +m_a=1 // kg // mass of the ball A +v_a=2 // m/s // velocity of ball A +m_b=2 // kg // mass of ball B +v_b=0 // m/s // ball B at rest +e=1/2 // coefficient of restitution +// Calculations +// Solving eqn's 1 & 2 using matrix for v'_a & v'_b, +A=[1 2;-1 1] +B=[2;1] +C=inv(A)*B +// Results +clc +printf('The velocity of ball A after impact is %f m/s \n',C(1)) +printf('The velocity of ball B after impact is %f m/s \n',C(2)) -- cgit