powered by
Converts arbitrary 3 x 3 matrices into the nearest SO(3) or orthogonal matrix.
nearest.SO3(x) nearest.orthog(x)
nearest.SO3 produces an orientation-class object holding the closest orientations.
nearest.SO3
orientation-class
nearest.orthog produces a 3 x 3 x n array of orthogonal matrices.
nearest.orthog
3 x 3 matrices stored in a 3 x 3 x n array)
Duncan Murdoch
Uses Stephens' (1979) algorithm to find the nearest (in entry-wise Euclidean sense) SO(3) or orthogonal matrix to a given matrix.
Stephens (1979). Vector correlation. Biometrika 66, 41-48.
x <- matrix(rnorm(9), 3,3) nearest.orthog(x) nearest.SO3(x) x <- -x nearest.orthog(x) nearest.SO3(x)
Run the code above in your browser using DataLab