diff options
Diffstat (limited to '24/CH3')
-rwxr-xr-x | 24/CH3/EX3.1/Example3_1.sce | 16 | ||||
-rwxr-xr-x | 24/CH3/EX3.1/Example3_1_result.txt | 2 | ||||
-rwxr-xr-x | 24/CH3/EX3.2/Example3_2.sce | 9 | ||||
-rwxr-xr-x | 24/CH3/EX3.2/Example3_2_result.txt | 2 | ||||
-rwxr-xr-x | 24/CH3/EX3.3/Example3_3.sce | 11 | ||||
-rwxr-xr-x | 24/CH3/EX3.3/Example3_3_result.txt | 4 | ||||
-rwxr-xr-x | 24/CH3/EX3.4/Example3_4.sce | 13 | ||||
-rwxr-xr-x | 24/CH3/EX3.4/Example3_4_result.txt | 2 | ||||
-rwxr-xr-x | 24/CH3/EX3.5/Example3_5.sce | 17 | ||||
-rwxr-xr-x | 24/CH3/EX3.5/Example3_5_result.txt | 2 | ||||
-rwxr-xr-x | 24/CH3/EX3.6/Example3_6.sce | 10 | ||||
-rwxr-xr-x | 24/CH3/EX3.6/Example3_6_result.txt | 2 | ||||
-rwxr-xr-x | 24/CH3/EX3.7/Example3_7.sce | 12 | ||||
-rwxr-xr-x | 24/CH3/EX3.7/Example3_7_result.txt | 3 | ||||
-rwxr-xr-x | 24/CH3/EX3.8/Example3_8.sce | 12 | ||||
-rwxr-xr-x | 24/CH3/EX3.8/Example3_8_result.txt | 5 |
16 files changed, 122 insertions, 0 deletions
diff --git a/24/CH3/EX3.1/Example3_1.sce b/24/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..43df19828 --- /dev/null +++ b/24/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,16 @@ +exec('degree_rad.sci', -1)
+
+//Given that
+a = [2,0]
+b = [2 *cos(dtor(30)),2 *sin(dtor(30))]
+c = [-1,0]
+
+//Sample Problem 3-1
+printf("**Sample Problem 3-1**\n")
+poss = [norm(a+b+c) norm(a-b+c), norm(a+b-c), norm(a-b-c)]
+max_norm = 0
+for v = poss
+ if v > max_norm then max_norm = v
+ end
+end
+printf("The maximum possible value is %f m", max_norm)
\ No newline at end of file diff --git a/24/CH3/EX3.1/Example3_1_result.txt b/24/CH3/EX3.1/Example3_1_result.txt new file mode 100755 index 000000000..49e2bc76b --- /dev/null +++ b/24/CH3/EX3.1/Example3_1_result.txt @@ -0,0 +1,2 @@ +**Sample Problem 3-1**
+The maximum possible value is 4.836559 m
\ No newline at end of file diff --git a/24/CH3/EX3.2/Example3_2.sce b/24/CH3/EX3.2/Example3_2.sce new file mode 100755 index 000000000..df248b39f --- /dev/null +++ b/24/CH3/EX3.2/Example3_2.sce @@ -0,0 +1,9 @@ +exec('degree_rad.sci', -1)
+
+//Given that
+dis = 215 //in km
+position = [dis * cos(dtor(22)), dis * sin(dtor(22))]
+
+//Sample Problem 3-2
+printf("**Sample Problem 3-2**\n")
+printf("The plane is %f km in the north & %f in the east", position(1),position(2))
\ No newline at end of file diff --git a/24/CH3/EX3.2/Example3_2_result.txt b/24/CH3/EX3.2/Example3_2_result.txt new file mode 100755 index 000000000..504e02829 --- /dev/null +++ b/24/CH3/EX3.2/Example3_2_result.txt @@ -0,0 +1,2 @@ +**Sample Problem 3-2**
+The plane is 199.344529 km in the north & 80.540418 in the east
\ No newline at end of file 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
diff --git a/24/CH3/EX3.4/Example3_4.sce b/24/CH3/EX3.4/Example3_4.sce new file mode 100755 index 000000000..ec0f53d29 --- /dev/null +++ b/24/CH3/EX3.4/Example3_4.sce @@ -0,0 +1,13 @@ +exec("degree_rad.sci",-1)
+
+//Given that
+a = [4.2,-1.5]
+b = [-1.6,2.9]
+c = [0,-3.7]
+
+//Sample Problem 3-4
+printf("**Sample Problem 3-4**\n")
+r = a + b + c
+magnitude = norm(r)
+angle = rtod(atan(r(2)/r(1)))
+printf("The magnitude of the vector is %f m & the angle measured from the x axis is %f", magnitude, (angle) )
\ No newline at end of file diff --git a/24/CH3/EX3.4/Example3_4_result.txt b/24/CH3/EX3.4/Example3_4_result.txt new file mode 100755 index 000000000..10b851f10 --- /dev/null +++ b/24/CH3/EX3.4/Example3_4_result.txt @@ -0,0 +1,2 @@ +**Sample Problem 3-4**
+The magnitude of the vector is 3.471311 m & the angle measured from the x axis is -41.496468
\ No newline at end of file diff --git a/24/CH3/EX3.5/Example3_5.sce b/24/CH3/EX3.5/Example3_5.sce new file mode 100755 index 000000000..9fc0245a5 --- /dev/null +++ b/24/CH3/EX3.5/Example3_5.sce @@ -0,0 +1,17 @@ +exec("degree_rad.sci",-1)
+
+//Given that
+a = [36,0] //in km
+c = [25 *cos(dtor(135)), 25 *sin(dtor(135))] //in km
+d_mag = 62 //in km
+
+//Sample Problem 3-5
+printf("**Sample Problem 3-5**\n")
+//we have a + b + c = d
+//therefore ax = bx + cx + dx
+// bx = 0
+d_x = a(1) + c(1)
+d_y = d_mag * sqrt(1 - (d_x/d_mag)^2)
+d = [d_x, d_y]
+b = d(2) - a(2) - c(2)
+printf("The magnitude of b is equal to %f km", b)
\ No newline at end of file diff --git a/24/CH3/EX3.5/Example3_5_result.txt b/24/CH3/EX3.5/Example3_5_result.txt new file mode 100755 index 000000000..73bb4527e --- /dev/null +++ b/24/CH3/EX3.5/Example3_5_result.txt @@ -0,0 +1,2 @@ +**Sample Problem 3-5**
+The magnitude of b is equal to 41.553169 km
\ No newline at end of file diff --git a/24/CH3/EX3.6/Example3_6.sce b/24/CH3/EX3.6/Example3_6.sce new file mode 100755 index 000000000..e08889b9e --- /dev/null +++ b/24/CH3/EX3.6/Example3_6.sce @@ -0,0 +1,10 @@ +exec("degree_rad.sci",-1)
+
+//Given that
+a = [3,-4,0]
+b = [-2,0,3]
+
+//Sample Problem 3-6
+printf("**Sample Problem 3-6**\n")
+angle_ab = acos(-norm(a*b')/(norm(a) * norm(b)))
+printf("The angle between given vectors is %f degress", rtod(angle_ab))
\ No newline at end of file diff --git a/24/CH3/EX3.6/Example3_6_result.txt b/24/CH3/EX3.6/Example3_6_result.txt new file mode 100755 index 000000000..cab29920d --- /dev/null +++ b/24/CH3/EX3.6/Example3_6_result.txt @@ -0,0 +1,2 @@ +**Sample Problem 3-6**
+The angle between given vectors is 109.440035 degress
\ No newline at end of file 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 diff --git a/24/CH3/EX3.8/Example3_8.sce b/24/CH3/EX3.8/Example3_8.sce new file mode 100755 index 000000000..6033b331f --- /dev/null +++ b/24/CH3/EX3.8/Example3_8.sce @@ -0,0 +1,12 @@ +exec("degree_rad.sci",-1)
+exec("cross_product.sci",-1)
+
+//Given that
+a = [3,-4,0]
+b = [-2,0,3]
+
+//Sample Problem 3-8
+printf("**Sample Problem 3-8**\n")
+cross_ab = crossproduct(a,b)
+printf("The cross product of given vectors is ")
+disp(cross_ab)
\ No newline at end of file diff --git a/24/CH3/EX3.8/Example3_8_result.txt b/24/CH3/EX3.8/Example3_8_result.txt new file mode 100755 index 000000000..1cc721e07 --- /dev/null +++ b/24/CH3/EX3.8/Example3_8_result.txt @@ -0,0 +1,5 @@ +**Sample Problem 3-8**
+The cross product of given vectors is
+ - 12.
+ - 9.
+ - 8.
\ No newline at end of file |