subject
Engineering, 12.03.2020 06:03 alialoydd

3. Matrices offer a very convenient and powerful way to describe the rotation of 3-dimensional vectors in space. Specifically, the three matrices that describe the rotation of a 3D vector R counter-clockwise by angles α, β, and γ about the X, Y , and Z axes, respectively, are given by cos β 0 sin β 0 1 0 sinB 0 cos P cos γ -sin Sin cos γ 0 Thus, to rotate a vector R counter-clockwise by an angle B about the Y axis, we perform the matrix-vector multiplication to obtain the rotated vector R'. Similarly, if we want to rotate the vector R counter-clockwise by an angle γ about the Z axis, and then counter-clockwise by an angle β about the Y axis, we perform the matrix-vector multiplication In component form, we can write out these matrix multiplications as 3 Write a MatLab program that asks the user to enter a 3D column vector R as well as a desired rotation angle about the Z axis and a desired rotation angle about the Y axis. The program must use nested for loops to calculate and print out the components of the new rotated column vector R. You may not use MatLab's built-in matrix multiplication operator (* or the sum(O function for this program. Instead vou should use a nested for loop to nultiply the matrix (a) To test your program, it's very useful to be able to visualize the result. If your input vector is named R and your rotated vector is named Rot, adding the following code to your program will produce a 3-D plot of the two vectors: plot3(x, Y, Z, '-g*') axis ([-3 3 -3 3 -3 3]); grid on; hold on xlabel'X axis') ylabel('Y axis); zlabel('Z axis) plot3(X, Y, Z, '-ro) legend 'R', 'RIprime') hold off You can then visually check that your program is doing the right thing by rotating a vector about the Z axis only by a small amount (say 20°), or rotating it about the Y axis only by a small amount. Note that you can look at the 3-D plot from any desired viewpoint by clicking on the "Rotate 3D" icon in toolbar of the plot window, and then dragging the mouse around within the window (b) Hand in a printout that shows the result obtained for the column vector R 1.3; 1.4; 15] 30° and then clockwise about the Y when it is rotated clockwise about the Z axis by y- axis by B-45°.

ansver
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, tjeffers90028
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
image
Engineering, 04.07.2019 18:10, anna22684
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
image
Engineering, 04.07.2019 18:10, jojoangelique13
The flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
image
Engineering, 04.07.2019 18:20, sarah7984
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
You know the right answer?
3. Matrices offer a very convenient and powerful way to describe the rotation of 3-dimensional vecto...

Questions in other subjects:

Konu
English, 27.12.2021 05:40
Konu
Mathematics, 27.12.2021 05:50