summaryrefslogtreecommitdiff
path: root/3137/CH16/EX16.30
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3137/CH16/EX16.30
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '3137/CH16/EX16.30')
-rwxr-xr-x3137/CH16/EX16.30/Ex16_30.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/3137/CH16/EX16.30/Ex16_30.sce b/3137/CH16/EX16.30/Ex16_30.sce
new file mode 100755
index 000000000..cc5f53e31
--- /dev/null
+++ b/3137/CH16/EX16.30/Ex16_30.sce
@@ -0,0 +1,21 @@
+//Initilization of variables
+u=0.2 //coefficient of friction
+ma=1.2 //kg
+mb=2 //kg
+g=9.8 //m/s^2
+//Calculations
+Nb=mb*g //N
+F=u*Nb //N
+//Using equations of motion
+//Solving for T and a
+A=[-1,-ma;1,-mb]
+B=[-ma*g;F]
+C=inv(A)*B
+T=C(1) //N
+a=C(2) //m/s^2
+//Taking the sum of the moments
+x_m=-(F*0.15+T*0.15)/Nb //m
+x=x_m*1000 //mm
+//Result
+clc
+printf('The acceleration of block A is %f m/s^2 and Nb acts at a distance %f mm\n Negative sign indictaes that the side assumed is incorrect',a,x)