![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
I am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is matrices that are not equal to each other. But, if I were to use the 'ZYX' sequence, I would get a matrix that is equal to the transpose of the matrix produced by my function.I mean that transpose(EA123toDCM) = E123toDCM if I changed the sequence to 'ZYX'. I never got two equal matrices. Can you fix my code so I would get two equal DCM matrices for the body 1-2-3 sequence?
Also, for the E123toDCM line, I am using the sequence 'XYZ'. Is that correct or should it be 'ZYX'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence?
EA = [pi/3; -pi/4; -pi/6];
EA123toDCM = EA123DCM(EA)
E123toDCM = angle2dcm(EA(1,1), EA(2,1), EA(3,1), 'XYZ')
function [R] = EA123DCM(EA)
theta1 = EA(1,1);
theta2 = EA(2,1);
theta3 = EA(3,1);
R1 = @(a)[1 0 0 ;
0 cos(a) -sin(a);
0 sin(a) cos(a)];
R2 = @(a)[cos(a) 0 sin(a) ;
0 1 0 ;
-sin(a) 0 cos(a)];
R3 = @(a)[ cos(a) -sin(a) 0;
sin(a) cos(a) 0;
0 0 1];
R = R3(theta1)*R2(theta2)*R1(theta3);
end
![Check Mark](/static/check-mark.png)
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
![Blurred answer](/static/blurred-answer.jpg)
- The dependence of the tensions t (units: N) in a structure on the external forces f (units: N) follows the linear system Ct=f, where both t and f are 5 by 1 column vectors. The coefficient matrix C has been determined to be [ 11 14 20 -5 -19 ] -5 7 -3 5 -6 4 -5 13 -2 -10 0 0 0 12 -10 0 0 0 0 14 By how many N would the external force f2 need to be decreased (while all other external forces stay the same) in order to decrease the tension t3 by 94 N?arrow_forwardWrite MATLAB code to solve a nonlinear equation using Newton-Raphson Methodarrow_forwardQ1 Use Matlab to find the roots of the following polynomials: (a) P₁ = 2s5 — 4s² + 3s³ − 2s² + 3s + 5 (b) P2 =S s6 + 5s³ s² + 10 -arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
![Text book image](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)