[R] vector normal to a plane

wwsprague@ucdavis.edu wwsprague at ucdavis.edu
Fri May 28 21:22:22 CEST 2004


Hi All,

(I have a degree in math, but I am too embarassed to ask my colleagues, 
so here goes:)

I would like to get a vector normal (orthogonal) to a plane formed by 
two other vectors.  In matlab I do this:

v1 = [.4, .6, .8]; v2 = [.9, .7, .2]; nn = cross(v1,v2) (gives ~[-.48, 
.65, -.24]

if I do R> cross(v1, v2), I get .94.  Huh?

Thanks for all your help, again.

W




More information about the R-help mailing list