Question

MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms w...

MatLab Engineering

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.

Code 1

Magnitude = 5;
Angle = 210;
X = Magnitude * cosd( Angle )
Y = Magnitude * sind( Angle )

Code 2

Xcomponents = [ 1, 2, -3, 4 ];
Ycomponents = [ 3, -6, 5, 0 ];
ResultantX = sum( Xcomponents )
ResultantY = sum( Ycomponents )

Code 3

Rx = -6;
Ry = 8;
Magnitude = sqrt( Rx^2 + Ry^2 )
Angle = atan2d( Ry, Rx )

Code 4

Magnitudes = [ 5, 13, 17 ];
Angles = [ 53.13, 157.38, -28.07 ];
X = Magnitudes .* 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 ];
Fh = Mag .* cosd( angY );
X = Fh .* cosd( phi )
Y = F .* cosd( AngY )
Z = Fh .* sind( phi )
0 0
Add a comment Improve this question Transcribed image text
Answer #1
Code 1: 
Magnitude = 5; (Given magnitude of vector)
Angle = 210; (Angle made by the vector) 
X = Magnitude * cosd( Angle )    (x-component of the vector)
Y = Magnitude * sind( Angle )    (y-component of the vector)

Code 2:

Xcomponents = [ 1, 2, -3, 4 ]; (Given x components of vectors stored in an array)
Ycomponents = [ 3, -6, 5, 0 ]; (Given y components of vectors stored in an array)
ResultantX = sum( Xcomponents )  (Resultant x component = sum of individual x components)
ResultantY = sum( Ycomponents )   (Resultant y component = sum of individual y components)

Code 3:

Rx = -6;  ( x component of vector R )
Ry = 8;   ( y component of vector R )
Magnitude = sqrt( Rx^2 + Ry^2 )   (Magnitude of vector R  = 22 V)
Angle = atan2d( Ry, Rx )           (Angle made by the resultant = Ry 1 tan)

Code 4:

Magnitudes = [ 5, 13, 17 ];   (Given magnitude of various vectors)
Angles = [ 53.13, 157.38, -28.07 ];  (Given angle of various vectors)
X = Magnitudes .* cosd( Angles )     (sum of x component of vectors = 5cos(53.13) + 13cos(157.58) + 17cos(-28.07) )
Y = Magnitudes .* sind( Angles ) (sum of y component of vectors = 5sin(53.13) + 13sin(157.58) + 17sin(-28.07) )

Code 5

F = [ 1, 2, 3, 4 ];
AngY = [ 0, 30, 120, 80 ];    (Angle made by vector)
phi = [ 30, 60, 90, 270 ];   (Angle made by vector)
Fh = Mag .* cosd( angY );  
X = Fh .* cosd( phi )  (Sum of x components of vector Fh)
Y = F .* cosd( AngY )  (Sum of x components of vector F )
Z = Fh .* sind( phi )   (Sum of y components of vector Fh)
Add a comment
Know the answer?
Add Answer to:
MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms w...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A key point is that in Matlab the equals sign, "=", is an assignment. It takes the result of what...

    A key point is that in Matlab the equals sign, "=", is an assignment. It takes the result of what is on the right side and puts it in the place named on the left side. Matlab is a script language so it works one line at a time from top to bottom. 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...

  • Describe what each code snippet does and how it might be used in Statics. Describe in...

    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. Hint: all arrays are components of vectors [ x, y, z ]. Code 1 V1 = [ 0, 1, 2 ]; V2 = [ 3, -4, 5 ]; x = 1; y = 2; z = 3;...

  • Module 3 Reading and Writing Code One of the things to learn in this course is...

    Module 3 Reading and Writing Code One of the things to learn in this course is OD. how to use Matlab or other computational tools for helping to solve Statics and other Engineering problems. The best way to learn how to code is by reading code. Belovw are several un-commented code snippets for computing things you will encounter in Statics. For this discussion first, describe what each code snippet does and how it might be used in Statics. Describe in...

  • - Find the y component of vector D Dy (Pay attention to the angle used in...

    - Find the y component of vector D Dy (Pay attention to the angle used in calculation, and the sign of this component.) : -Calculate the x component of vector?⃗, Rx: -Calculate the y component of vector?⃗, Ry: -Calculate magnitude of vector?⃗: -Find the direction of the vector?⃗: The direction is represented by a counterclockwise angle from the +xaxis. -Vectors?⃗and?⃗ are the same as above, Their magnitudes are: A = 6.4 m, B = 11.2 m, the angles in the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT