diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1205/CH14/EX14.5/S_14_5.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1205/CH14/EX14.5/S_14_5.sce')
-rw-r--r-- | 1205/CH14/EX14.5/S_14_5.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/1205/CH14/EX14.5/S_14_5.sce b/1205/CH14/EX14.5/S_14_5.sce new file mode 100644 index 000000000..eae86f93a --- /dev/null +++ b/1205/CH14/EX14.5/S_14_5.sce @@ -0,0 +1,16 @@ +clc;
+//By theoritical work, applying law of conservation of momentum and energy we get
+//vA=(vB)y=3vc-6, (vB)x=3-vc
+//20*vc^2-78*vc+72=0
+
+y=poly([72,-78,20],'x','coeff');//Obtained polynomial
+vc=roots(y);//m/s,
+vc=vc(1);//AS vc(2) gives negative value of vA
+vA=3*vc-6;// m/s Velocity with which ball A hits the side of table
+vBy=3*vc-6;//m/s, y coefficient Velocity with which ball B hits the side of table
+vBx=3-vc;//m/s, x coefficient Velocity with which ball B hits the side of table
+vB=[vBx,vBy];//m/s Velocity with which ball B hits the side of table
+theta=atan(-vBy/vBx);//rad, angle of velocity B
+theta=theta*180/%pi;//degree
+
+printf("Velocities with which balls hits the sides of table are\n vA= %.1f m/s \n vB= %.3f m/s with theta= %.1f degree \n vC=%.1f m/s\n",vA,norm(vB),theta,vc);
|