Group Abstract Group Abstract

Message Boards Message Boards

2
|
4.6K Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

EulerAngles very sensitive to precision of real matrix input

Posted 8 years ago
POSTED BY: Hans Milton
2 Replies
Posted 8 years ago

Thanks Sander. A less exotic workaround is to orthogonalize the matrix when needed:

m = EulerMatrix@{0.52, 1.05, 1.22}
n = Round[m, 0.000001]

In[3]:= EulerAngles@Orthogonalize@n
Out[3]= {0.52, 1.05, 1.22}
POSTED BY: Hans Milton

Hi Hans,

It checks:

Chop[Det[n] - 1] == 0

which fails for you. If you are confident this is 'ok' (i.e. less stringent than what Chop thinks is 0). You can also call the sub-function directly:

Reverse@AffineTransformsDump`RPYijk[m, {3, 2, 3}]

giving:

{0.52, 1.05, 1.22}
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard