summaryrefslogtreecommitdiff
path: root/3648/CH1/EX1.2
diff options
context:
space:
mode:
Diffstat (limited to '3648/CH1/EX1.2')
-rw-r--r--3648/CH1/EX1.2/Ex1_2.sce26
-rw-r--r--3648/CH1/EX1.2/Ex1_2.txt2
2 files changed, 28 insertions, 0 deletions
diff --git a/3648/CH1/EX1.2/Ex1_2.sce b/3648/CH1/EX1.2/Ex1_2.sce
new file mode 100644
index 000000000..753003b4c
--- /dev/null
+++ b/3648/CH1/EX1.2/Ex1_2.sce
@@ -0,0 +1,26 @@
+//Example 1_2
+clc();
+clear;
+// To add the given vector displacements
+a=1 //units in meters
+b=3 //units in meters
+c=5 //units in meters
+d=6 //units in meters
+theta1=90 //units in degrees
+Rx_a=a*sin(theta1*%pi/180) //units in meters
+Rx_b=round(b*cos(theta1*%pi/180)) //units in meters
+theta2=37 //units in degrees
+Rx_c=-round(c*cos(theta2*%pi/180)) //units in meters
+theta3=53 //units in degrees
+Rx_d=-d*cos(theta3*%pi/180)
+Ry_a=round(a*cos(theta1*%pi/180)) //units in meters
+Ry_b=round(c*sin(theta2*%pi/180)) //units in meters
+Ry_c=round(c*sin(theta2*%pi/180)) //units in meters
+Ry_d=-(d*sin(theta3*%pi/180)) //units in meters
+Rx=Rx_a+Rx_b+Rx_c+Rx_d //units in meters
+Ry=Ry_a+Ry_b+Ry_c+Ry_d //units in meters
+R=sqrt(Rx^2+Ry^2) //units in meters
+phi=round(atan(Ry/-(Rx))*180/%pi) //units in degrees
+phi=180-phi //units in degrees
+printf("The Resultant R=%.2f Meters\n",R)
+printf("The Angle theta=%d degrees",phi)
diff --git a/3648/CH1/EX1.2/Ex1_2.txt b/3648/CH1/EX1.2/Ex1_2.txt
new file mode 100644
index 000000000..21532d8de
--- /dev/null
+++ b/3648/CH1/EX1.2/Ex1_2.txt
@@ -0,0 +1,2 @@
+The Resultant R=6.72 Meters
+The Angle theta=170 degrees \ No newline at end of file