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
Ahouse has the following electrical appliance usage (1) single 40w lamp used for 4 hours per day (2) single 60w fan used for 12 hours per day (3) single 200w refrigerator that runs 24 hours per day with compressor run 12 hours and off 12 hours find the solar power inverter size in watt with correction factor of 1.25.
Answers: 1
question
Engineering, 04.07.2019 18:10
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
question
Engineering, 04.07.2019 18:10
Which of the following ziegler nichols tuning methods the response of the controller to a step input should exhibit an s-shaped curve? a)-open loop mode b)-closed loop mode c)-both modes (open & closed) d)-none of the modes (open & closed)
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
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, 29.07.2021 07:20
question
Mathematics, 29.07.2021 07:20
question
Biology, 29.07.2021 07:20
Questions on the website: 13722360