summaryrefslogtreecommitdiff
path: root/3137/CH1/EX1.11
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3137/CH1/EX1.11
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/CH1/EX1.11')
-rwxr-xr-x3137/CH1/EX1.11/Ex1_11.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/3137/CH1/EX1.11/Ex1_11.sce b/3137/CH1/EX1.11/Ex1_11.sce
new file mode 100755
index 000000000..3d5aed984
--- /dev/null
+++ b/3137/CH1/EX1.11/Ex1_11.sce
@@ -0,0 +1,15 @@
+//Initilization of variables
+x=2
+y=-4
+z=1
+F=100 //N
+//Calculation
+thetax=x/sqrt(x^2+y^2+z^2) //radians
+thetay=y/sqrt(x^2+y^2+z^2) //radians
+thetaz=z/sqrt(x^2+y^2+z^2) //radians
+P_x=F*thetax //N
+P_y=F*thetay //N
+P_z=F*thetaz //N
+//Result
+clc
+printf('The vector P is:%fi%fj+%fk N',P_x,P_y,P_z) //N