Skip to contents

Creates a skewmatrix-class object.

Usage

skewmatrix(a)

Arguments

a

3 x 3 x n array or 3 x 3 matrix containing the entries of a skew-symmetric matrix, or an orientation object.

Details

The entries a[,,i] are 3 x 3 skew-symmetric matrices. The matrix exponential of these give SO(3) matrices.

Value

A skewmatrix-class object.

Author

Duncan Murdoch

Examples

x <- skewmatrix(matrix(c(0,1,2,-1,0,3,-2,-3,0),3,3))
x
#> An object of class "skewmatrix"
#> Slot "x":
#> , , 1
#> 
#>      [,1] [,2] [,3]
#> [1,]    0   -1   -2
#> [2,]    1    0   -3
#> [3,]    2    3    0
#> 
#> 
rotmatrix(x)
#> An object of class "rotmatrix"
#> Slot "x":
#> , , 1
#> 
#>             [,1]       [,2]       [,3]
#> [1,]  0.34810748 -0.6313497  0.6929782
#> [2,] -0.93319235 -0.3037850  0.1920070
#> [3,]  0.08929286 -0.7135210 -0.6949206
#> 
#> 
skewvector(x)
#> An object of class "skewvector"
#> Slot "x":
#>      [,1] [,2] [,3]
#> [1,]   -3    2   -1
#> 
rotation.angle(x)
#> [1] 2.541528