summaryrefslogtreecommitdiff
path: root/1205/CH2/EX2.7
diff options
context:
space:
mode:
Diffstat (limited to '1205/CH2/EX2.7')
-rw-r--r--1205/CH2/EX2.7/S_2_7.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/1205/CH2/EX2.7/S_2_7.sce b/1205/CH2/EX2.7/S_2_7.sce
new file mode 100644
index 000000000..ff95faa36
--- /dev/null
+++ b/1205/CH2/EX2.7/S_2_7.sce
@@ -0,0 +1,30 @@
+
+clc;
+dx=-40;//m
+dy=80;//m
+dz=30;//m
+f=2500;//N, Mafnitude of force F
+d=sqrt(dx^2+dy^2+dz^2);//m, total distance of vector AB
+//F=f*lambda, lambda - unit vector= AB/d. So we can calculate each component by multiplying this unit vector
+Fx=f*dx/d;//N , X component of F
+Fy=f*dy/d;//N , Y component of F
+Fz=f*dz/d;//N , Z component of F
+
+printf("Component of F along X axis is %.2f N\n",Fx);
+printf("Component of F along Y axis is %.2f N\n",Fy);
+printf("Component of F along Z axis is %.2f N\n",Fz);
+printf("We may write F as \n F = %.2f i + %.2f j + %.2f k\n",Fx,Fy,Fz);
+
+thetax=acos(Fx/f);// radian , angle with +ve x axis
+thetay=acos(Fy/f);// radian , angle with +ve y axis
+thetaz=acos(Fz/f);// radian , angle with +ve z axis
+
+//Conversion of angles into degree
+thetax=thetax*180/%pi;//degree
+thetay=thetay*180/%pi;//degree
+thetaz=thetaz*180/%pi;//degree
+
+printf("Angle made by F with +ve X axis %.2f degree\n",thetax);
+
+printf("Angle made by F with +ve Y axis %.2f degree\n",thetay);
+printf("Angle made by F with +ve Z axis %.2f degree\n",thetaz);