diff options
Diffstat (limited to '24/CH3/EX3.3/Example3_3.sce')
-rwxr-xr-x | 24/CH3/EX3.3/Example3_3.sce | 11 |
1 files changed, 11 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 |