Engineering
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°.

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, demarcuswiseman
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
image
Engineering, 04.07.2019 18:20, maustin5323
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
image
Engineering, 04.07.2019 18:20, luisgonz5050
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
image
Engineering, 04.07.2019 18:20, rbgrh9465
An open feedwater heater operates at steady state with liquid entering at inlet 1 with t? = 40°c and pl = 1 .2 mpa. water vapor att2-200°c and p2 = 1.2 mpa enters at inlet 2. saturated liquid water exits with a pressure of pa 1.2 mpa. neglect heat transfer with the surroundings and all kinetic and potential energy effects, determine the mass flow rate of steam at inlet 2 if the mass flow rate of liquid water at inlet 1 is given as 2 kg/s.
Answers: 3
Do you know the correct answer?
3. Matrices offer a very convenient and powerful way to describe the rotation of 3-dimensional vecto...

Questions in other subjects:

Konu
Mathematics, 28.07.2019 18:30
Konu
History, 28.07.2019 18:30