For this discussion describe what each code snippet does and how it might be use
ID: 3912570 • Letter: F
Question
For this discussion describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. All of these involve some concept covered in this module Make your first posting by Thursday and two replies to other students by the end of the module week. Code 1 Magnitude -5; Angle - 210 XMagnitude * cosd( Angle ) Y Magnitude * sind( Angle) Code 2 Xcomponents 1, 2, -3, 4 ]; Ycomponents 3, -6, 5, 0 ]; ResultantX = sum( Xcomponents ) Resultant' = sum( Ycomponents ) Code 3 Rx-6; Ry 8; Magnitudesqrt( RxA2 RyA2) Angle atan2d( Ry, Rx Code 4 Magnitudes 5, 13, 17]; Angles 53.13, 157.38, -28.07]; XMagnitudes .* cosd( Angles) Y Magnitudes .* sind( Angles Code 5 (hint: Figure 2.25) F 1, 2, 3, 4 ]; AngY [ 0, 30, 120, 80); phi-[30, 60, 90, 270 1; Fh -Mag .* cosd( angY; Y = F . * cosa AngY )Explanation / Answer
Code 1 :
In this code two input are given : one is magnitude and the other one is angle in degrees.
Then two variables are calculated using them as
X= magnitude * cost(angle) :- which may represents the x component of the vector, if the point whose magnitude is given represents a vector. Angle represents the angle between the angle between that vector and the X axis.
Similarly Y = magnitude * sind(angle) : it represents the y component of the vector, component along y axis.
d is used with cos (cosd) and sin(sind) to represents that the angle is given in degrees.
The output values calculated for X and Y are :
X= -4.3301
Y= -2.5
Code 2 :
In this two arrays are given as input : Xcomponents and Ycomponents. This may represents the values of the 4 vectors along the x axis and y axis respectively.
Then ResultantX and ResultantY are calculated as the sum of all the values long the x axis and y axis respectively given by above defined arrays.
After calculation values in ResultantX and ResultantY are :
ResultantX = 4
ResultantY = 2
Code 3 :
In this code two input variables Rx and Ry are given, these values may be the resultant values of the vector along the a and y axis resp. Then magnitude is calculated as the square root of the sum of both resultants.
Then angle between the vector and x axis is calculated as the inverse tangent of Ry/Rx. This is four quadrant inverse tangent [-180,180].
The values calculated are :
Magnitude := 10
Angle := -36.86 degrees
Code 4 :
In this code snippet two arrays are given as input, one containing the 3 magnitudes of three different vectors and the second array contains the angle made by these three vectors with the x axis.
Then The respective X and Y components for those three vectors are calculated as and to do this for array dot product is used :
X = [3.00, -11.9999, 15.000 ]
Y = [ 3.999, 5.000, -7.999 ]
These values may also be rounded off to nearest integer when computation is done in languages.
Hope this helps.
Any query please comment.
Please upvote
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.