error in rotm2eul stating "NaN/Inf breakpoint hit for validateRotationMatrix.m on line 22. 22 'real','3d','size',[3 3 NaN],varargin{:}}, ..."

1 view (last 30 days)
rotm = [0 0 1; 0 1 0; -1 0 0];
eulZYX = rotm2eul(rotm)
this test is failing throwing error
NaN/Inf breakpoint hit for validateRotationMatrix.m on line 22.
22 'real','3d','size',[3 3 NaN],varargin{:}}, ...
I have already verified licence and packages
MATLAB Version 9.7 (R2019b)
Communications Toolbox Version 7.2 (R2019b)
DSP System Toolbox Version 9.9 (R2019b)
Deep Learning Toolbox Version 13.0 (R2019b)
Image Processing Toolbox Version 11.0 (R2019b)
Navigation Toolbox Version 1.0 (R2019b)
Signal Processing Toolbox Version 8.3 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)

Answers (1)

Ronit
Ronit on 29 May 2025
The error you are encountering typically suggests that the rotation matrix is being rejected as invalid by the "rotm2eul" function, likely because it is not a numerically valid rotation matrix (i.e., its determinant is not 1, or it is not perfectly orthonormal).
After verifying these conditions, it has been confirmed that the matrix in question is indeed a valid rotation matrix.
Additionally, the operation works correctly on my system. I would recommend upgrading your MATLAB installation to the latest version, as this may resolve the issue.
I hope this helps address your concern.
Thanks

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!