dot: Dot product of vectors.

Description Usage Arguments Value Author(s)

View source: R/dot.R

Description

Computer the (real) Euclidean dot product of 3-vectors.

Usage

1
dot(x1, x2)

Arguments

x1

left vector, either 3-vector or n x 3 matrix

x2

right vector, either 3-vector or n x 3 matrix

Value

vector or matrix of dot products. If both x1 and x2 are 3-vectors, then the result is a scalar. If x1 is a 3-vector but x2 is an n x 3 matrix, the results is a vector of length n giving the dot product of x1 with each row of x2. Similarly if x1 is an n x 3 matrix and x2 is a 3-vector. Finally, if x1 is m x 3 and x2 is m x 3, returns an m x n matrix with entry [i, j] giving the dot product of the i-th row of x1 with the j-th row of x2.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


jbrzusto/sensorgnome-R-package documentation built on May 18, 2019, 9:19 p.m.