diff options
Diffstat (limited to '2510/CH4/EX4.2/Ex4_2.sce')
-rwxr-xr-x | 2510/CH4/EX4.2/Ex4_2.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/2510/CH4/EX4.2/Ex4_2.sce b/2510/CH4/EX4.2/Ex4_2.sce new file mode 100755 index 000000000..e67290cdf --- /dev/null +++ b/2510/CH4/EX4.2/Ex4_2.sce @@ -0,0 +1,19 @@ +//Variable declaration: +Fx = -63 //Force component in X direction (N) +Fy = 63 //Force component in Y direction (N) +lbf = 0.22481 //Pound-forrce in unit newton (lbf) + +//Calculations: +Fr = sqrt(Fx**2 + Fy**2)*lbf //The resultant supporting force (lbf) +u = atand(Fy,Fx) //Angle between the positive x axis and the direction of the force (degrees) + +//Result: +if ( 0<u & u<90 ) then + printf ("The supporting force is : %.1f lbf acting at %f ° i.e in the northeast direction.",Fr,u) +elseif (90<u & u<180) then + printf ("The supporting force is : %.1f lbf acting at %f ° i.e in the northwest direction.",Fr,u) +elseif (180<u & u<270) then + printf ("The supporting force is : %.1f lbf acting at %f ° i.e in the southwest direction.",Fr,u) +elseif (270<u & u<360) then + printf ("The supporting force is : %.1f lbf acting at %f ° i.e in the southeast direction.",Fr,u) +end |