MATLAB Answers

Quaterion Creation In Simulink

2 views (last 30 days)
Hello,
I am just starting to work with quaterions and I am currently confused as to how they are defined in Simulink. From what I have read so far are have a basic understanding of how they can be used to define rotations in 3D space. I understand the mathmatical form of a+bi+cj+dk, I just don't undestand how they are inplemented in matlab.
I would like to define a quaternion by specifing an axis + angle and then building the quaternion. I assumed that it would be as simple as using a mux block with the angle first and then the three elements of the vector. However this does not seam to be the case.
I ran this test and it does not show the same results.
Can anyone help explain where I went wrong. Or help explain the following deffintion from the doc page.
"Quaternions in the form of [q0, r0, ..., q1, r1, ... , q2, r2, ... , q3, r3, ...],"
Thanks

  0 Comments

Sign in to comment.

Accepted Answer

James Tursa
James Tursa on 17 Mar 2020
Edited: James Tursa on 17 Mar 2020
See these posts for discussions of the MATLAB quaternion convention:
If they don't answer your questions then feel free to post some follow-up questions here in this thread.

  3 Comments

James Mulhern
James Mulhern on 18 Mar 2020
Your referneces did help to expain my issues. I would also like to point out that my creation of the quaternion was incorrect becasue it is not normalized to 1. The quaternions should take the form
James Tursa
James Tursa on 19 Mar 2020
I presume you meant Y * S in the 3rd spot instead of Y * X.
James Mulhern
James Mulhern on 19 Mar 2020
Good catch. I updated it.

Sign in to comment.

More Answers (0)

Sign in to answer this question.