Skip to contents

Mean resultant of a set of vectors

Usage

vresultant(x, w = NULL, mean = FALSE)

Arguments

x

numeric. Can be three element vector or a three column array

w

numerical vector of weights the same length as x giving the weights to use for elements of x.

mean

logical. Whether the mean resultant (TRUE) or resultant (FALSE, the default) is returned.

Value

if mean==TRUE, mean resultant is returned and numeric otherwise.

Examples

x <- rvmf(100, mu = Line(120, 50), k = 5) |> to_vec()
vresultant(x, mean = FALSE)
#>           [,1]     [,2]     [,3]
#> [1,] -21.94622 41.16386 63.67276
vresultant(x, mean = TRUE)
#>            [,1]      [,2]      [,3]
#> [1,] -0.2194622 0.4116386 0.6367276