nearest | R Documentation |
Converts arbitrary 3 x 3 matrices into the nearest SO(3) or orthogonal matrix.
nearest.SO3(x) nearest.orthog(x)
x |
3 x 3 matrices stored in a 3 x 3 x n array) |
Uses Stephens' (1979) algorithm to find the nearest (in entry-wise Euclidean sense) SO(3) or orthogonal matrix to a given matrix.
nearest.SO3
produces an orientation-class
object holding the closest orientations.
nearest.orthog
produces a 3 x 3 x n array of orthogonal matrices.
Duncan Murdoch
Stephens (1979). Vector correlation. Biometrika 66, 41-48.
orientation-class
x <- matrix(rnorm(9), 3,3) nearest.orthog(x) nearest.SO3(x) x <- -x nearest.orthog(x) nearest.SO3(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.