summaryrefslogtreecommitdiff
path: root/24/CH3/EX3.7
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH3/EX3.7
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 '24/CH3/EX3.7')
-rwxr-xr-x24/CH3/EX3.7/Example3_7.sce12
-rwxr-xr-x24/CH3/EX3.7/Example3_7_result.txt3
2 files changed, 15 insertions, 0 deletions
diff --git a/24/CH3/EX3.7/Example3_7.sce b/24/CH3/EX3.7/Example3_7.sce
new file mode 100755
index 000000000..666626389
--- /dev/null
+++ b/24/CH3/EX3.7/Example3_7.sce
@@ -0,0 +1,12 @@
+exec("degree_rad.sci",-1)
+exec("cross_product.sci",-1)
+
+//Given that
+a = [18 * cos(dtor(250)), 18 * sin(dtor(250)),0]
+b = [0,0,12]
+
+//Sample Problem 3-7
+printf("**Sample Problem 3-7**\n")
+cross_ab = crossproduct(a,b)
+angle_x = acos(cross_ab(1)/norm(cross_ab))
+printf("The magnitude of cross product of given vectors is %f \n and angle with the x axis in degrees is %f", norm(cross_ab),rtod(angle_x)) \ No newline at end of file
diff --git a/24/CH3/EX3.7/Example3_7_result.txt b/24/CH3/EX3.7/Example3_7_result.txt
new file mode 100755
index 000000000..26300f6d3
--- /dev/null
+++ b/24/CH3/EX3.7/Example3_7_result.txt
@@ -0,0 +1,3 @@
+**Sample Problem 3-7**
+The magnitude of cross product of given vectors is 216.000000
+ and angle with the x axis in degrees is 160.000000 \ No newline at end of file