subject
Engineering, 14.05.2021 04:00 pawfox

Adding Rotations to Our Quaternion Class We have developed a quaternion class in MATLAB to perform most of the basic arithmetic operations involving quaternions, and we would like to be able to expand this to include operations for handling 3D rotations. To do this, we would to add two methods to the quaternion class that allow us to compute these rotations. 1. obj = rotationquaternion(n, th) Will be a function that takes as its input a 3-vector n = [nx ny nz] that will serve as the axis of rotation and an angle th given in radians. This function will construct the rotation quaternion q according to the formula 9= COS + sin (*) (nzi+nyj + n_k). 2 Requirements: • This function should return obj , which is a member of the quaternion class. (This just means that you use the constructor like we have in other methods where we need to return a quaternion.) • The program needs to make sure that n is a unit vector. The easiest way to do this is to divide by norm(n) . (You don't need the 1 * that shows up in the example above. That's just there for plotting purposes.)

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
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:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
question
Engineering, 04.07.2019 18:20
The characteristic roots of a dynamic system are: 1.7920 1.8160 i, -1.7920 1.8160 i, -0.4160 what is the order of this system? what are the settling time and damping ratio of the system?
Answers: 3
You know the right answer?
Adding Rotations to Our Quaternion Class We have developed a quaternion class in MATLAB to perform m...
Questions
question
Mathematics, 13.12.2021 05:40
question
Mathematics, 13.12.2021 05:40
question
Mathematics, 13.12.2021 05:40
question
Mathematics, 13.12.2021 05:40
question
Mathematics, 13.12.2021 05:40
question
Mathematics, 13.12.2021 05:40
Questions on the website: 13722367