Question

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 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

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 : nitude Value ia s le. e Value is 21o Casa (Angle) retion ces( 20) value Simi Y- Magnitude x s)nio ฝ่า the . gadt ThisMagmilade s(yle) tj sin (Angle) Code 2: Xcompement3 euti is a vedtor 4- values Xmpt stored in ResulX in KesuttantX This s uneporator h (-to th,e Eg Ry- 3 This ud calculationMamitzde and phax* at diCode - 4 eb I Values in it ** Magnitude.米 Cosd (AngLs) Leb b= 60 But tor Element-Element Multiplica tion an also (ode-SHere is no Speihed But Since is tthie Vectos atta Mag,, (H)叩natur must be av Seinme valuex as angY mo. y have Same ho. lemeut

Add a comment
Know the answer?
Add Answer to:
A key point is that in Matlab the equals sign, "=", is an assignment. It takes the result of what...
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
  • 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...

  • 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...

  • Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial...

    Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously...

  • Course and Section cto EXPERIMENT ac series-Parallel Sinusoidal Circuits OBJECTIVES 1. Measure th...

    Course and Section cto EXPERIMENT ac series-Parallel Sinusoidal Circuits OBJECTIVES 1. Measure the currents of series-parallel R-L and R-C networks using sensing resistors 2. Demonstrate the Pythagorean relationship between the currents of the networks. 3. Measure the phase angles associated with the currents of the networks. 4. Calculate the input impedance of a parallel network using measured values EQUIPMENT REQUIRED Instruments Resistors 1-10-Q, 470-Ω, l-kM (14.W) Inductors 1-10-mH Capacitors 1-0.02-pF I-DMM 1--Oscilloscope 1-Audio oscillator or function generator 1--Frequency counter (if...

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