quat2dcm function error message
이전 댓글 표시
Hello,
I'm new to the use of these types of functions to transform from one reference frame into another and trying to go from a set of quaternions to a DCM reference frame. However, when trying to use any of the axis transformation functions from quaternions, I get the error message below to say 'input elements are not real'. I can, however, convert to euler angles understandably.
I do not understand why the input elements would not be 'real' since they are simply a set of quaternions derived from accelerometer and gyroscope readings.
Any help much appreciated. Thanks in advance.
dcm = quat2dcm(Q);
Error using quatmod (line 19)
Input elements are not real.
Error in quatnormalize (line 19)
qout = q./(quatmod( q )* ones(1,4));
Error in quat2dcm (line 24)
qin = quatnormalize( q );
댓글 수: 5
Walter Roberson
2022년 8월 28일
please show
whos q
Tinman
2022년 8월 28일
Tinman
2022년 8월 28일
Walter Roberson
2022년 8월 28일
편집: Walter Roberson
2022년 8월 28일
Please show the output of
whos Q
I don't understand why I am being told the elements aren't real, assuming that the indication there is that they are not 'real numbers'.
Because it gives the same error message if the input is not class double(), and possibly if it is not an N x 4 matrix of double.
Tinman
2022년 8월 30일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Quaternion Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

