summaryrefslogtreecommitdiff
path: root/24/CH3/EX3.3
diff options
context:
space:
mode:
Diffstat (limited to '24/CH3/EX3.3')
-rwxr-xr-x24/CH3/EX3.3/Example3_3.sce11
-rwxr-xr-x24/CH3/EX3.3/Example3_3_result.txt4
2 files changed, 15 insertions, 0 deletions
diff --git a/24/CH3/EX3.3/Example3_3.sce b/24/CH3/EX3.3/Example3_3.sce
new file mode 100755
index 000000000..f04af29ce
--- /dev/null
+++ b/24/CH3/EX3.3/Example3_3.sce
@@ -0,0 +1,11 @@
+exec("degree_rad.sci",-1)
+
+//Given that
+displacement_vector = [-2.6,-3.9,.025] //each in km
+
+//Sample Problem 3-3
+printf("**Sample Problem 3-3**\n")
+mag = norm(displacement_vector)
+sw_angle = atan(displacement_vector(2)/displacement_vector(1))
+up_angle = displacement_vector(3)/norm(displacement_vector)
+printf("The team displacement vector had a magnitude %f km,\n and was at an angle of %d south of west and\n at an angle of %f upward", mag, rtod(sw_angle), rtod(up_angle)) \ No newline at end of file
diff --git a/24/CH3/EX3.3/Example3_3_result.txt b/24/CH3/EX3.3/Example3_3_result.txt
new file mode 100755
index 000000000..7d332eac3
--- /dev/null
+++ b/24/CH3/EX3.3/Example3_3_result.txt
@@ -0,0 +1,4 @@
+**Sample Problem 3-3**
+The team displacement vector had a magnitude 4.687283 km,
+ and was at an angle of 56 south of west and
+ at an angle of 0.305592 upward