vectorialOperations: Basic Vectorial Operations

Description Usage Arguments Value See Also Examples

Description

Basic vectorial operations such as scalar product and vectorial product

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Scalar product
dotProd(U, V)

## Norm of a vector
vectNorm(U)

## Rotation of the components of a vector
rotVect(U, n = 1)

## Vectorial product
vectProd(U, V)

Arguments

U

a numeric vector of length 3.

V

a numeric vector of length 3.

n

an integer.

Value

  • dotProct return a single element numeric vector.

  • vectNorm return a single element numeric vector.

  • rotVect return a numeric vector of length 3.

  • vectProct return a numeric vector of length 3.

See Also

matmult

Examples

1
2
3
4
5
6
Vx <- c(3,0,0)
vectNorm(Vx)
Vx <- Vx/vectNorm(Vx)
Vy <- c(0,1,0)
Vz <- vectProd(Vx, Vy)
print(Vz)


Rpdb documentation built on May 19, 2017, 6:09 p.m.
Search within the Rpdb package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.