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

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The temperature of air decreases as it is compressed by an adiabatic compressor. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
question
Engineering, 04.07.2019 18:20
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
question
Engineering, 04.07.2019 18:20
Acertain flow of air (at stp) has a velocity distribution given by v i (in ft/s). if this flow is going through a 4 ft square area in the yz-plane (centered at the origin), what is the mass flow rate (in lbm/s)?
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
question
Engineering, 30.11.2020 17:40
Questions on the website: 13722363