cross function

Numerical and Symbolic Cross Product

Numerical and Symbolic Cross Product

Computes the cross product of n1n-1 vectors of length nn.

cross(...) x %cross% y

Arguments

  • ...: n1n-1 vectors of length nn.
  • x: numeric or character vector of length 3.
  • y: numeric or character vector of length 3.

Returns

nn-dimensional vector orthogonal to the n1n-1 vectors.

Functions

  • x %cross% y: binary operator for 3-dimensional cross products.

Examples

### canonical basis 4-d cross(c(1,0,0,0), c(0,1,0,0), c(0,0,0,1)) ### canonical basis 3-d cross(c(1,0,0), c(0,1,0)) ### symbolic cross product 3-d c(1,0,0) %cross% c(0,1,0) ### symbolic cross product 3-d c("a","b","c") %cross% c(0,0,1)

References

Guidotti E (2022). "calculus: High-Dimensional Numerical and Symbolic Calculus in R." Journal of Statistical Software, 104(5), 1-37. tools:::Rd_expr_doi("10.18637/jss.v104.i05")

  • Maintainer: Emanuele Guidotti
  • License: GPL-3
  • Last published: 2023-03-09

Downloads (last 30 days):