Hi, everyone,

I need an efficient way to do vectors cross product in R.

Set vectors,
V1 = ai + bj + ck
V2 = di + ej + fk

then the cross product is
  V1 x V2    =  (bf - ce) i + (cd - af) j + (ae - bd) k


As shown here ( http://en.wikipedia.org/wiki/Cross_product ).

Thanks.

Best,
Bai

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to