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 /1958/CH2/EX2.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 '1958/CH2/EX2.1')
-rwxr-xr-x | 1958/CH2/EX2.1/Chapter2_example1.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/1958/CH2/EX2.1/Chapter2_example1.sce b/1958/CH2/EX2.1/Chapter2_example1.sce new file mode 100755 index 000000000..8b3aa5bbd --- /dev/null +++ b/1958/CH2/EX2.1/Chapter2_example1.sce @@ -0,0 +1,12 @@ +clc
+clear
+//Input data
+F=[6,2]//Constant force in vector form 6i+2j in N
+s=[3,5]//Displacement in vector form 3i+5j in N
+
+//Calculations
+W=(F(1)*s(1))+(F(2)*s(2))//Workdone in J
+q=acosd(W/(sqrt(F(1)^2+F(2)^2)*sqrt(s(1)^2+s(2)^2)))//Angle between Force and displacement in degrees
+
+//Output
+printf('Workdone by the force is %3.0f J \n Angle between Force and displacement is %3.1f degrees',W,q)
|