nearest {orientlib} | R Documentation |
Find nearest SO(3) or orthogonal matrix.
Description
Converts arbitrary 3 x 3 matrices into the nearest SO(3) or orthogonal matrix.
Usage
nearest.SO3(x)
nearest.orthog(x)
Arguments
x |
3 x 3 matrices stored in a 3 x 3 x n array) |
Details
Uses Stephens' (1979) algorithm to find the nearest (in entry-wise Euclidean sense) SO(3) or orthogonal matrix to a given matrix.
Value
nearest.SO3
produces an orientation-class
object holding the closest orientations.
nearest.orthog
produces a 3 x 3 x n array of orthogonal matrices.
Author(s)
Duncan Murdoch
References
Stephens (1979). Vector correlation. Biometrika 66, 41-48.
See Also
Examples
x <- matrix(rnorm(9), 3,3)
nearest.orthog(x)
nearest.SO3(x)
x <- -x
nearest.orthog(x)
nearest.SO3(x)
[Package orientlib version 0.10.5 Index]