diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /3204/CH18/EX18.1 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '3204/CH18/EX18.1')
-rw-r--r-- | 3204/CH18/EX18.1/Ex18_1.sce | 15 |
1 files changed, 15 insertions, 0 deletions
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))
|