R - Compute Cross Product of Vectors (Physics)

后端 未结 5 1934
半阙折子戏
半阙折子戏 2021-01-05 20:49

What am I doing wrong?

> crossprod(1:3,4:6)
     [,1]
[1,]   32

According to this website:http://onlinemschool.com/math/assistance/vecto

5条回答
  •  死守一世寂寞
    2021-01-05 21:04

    crossprod does the following: t(1:3) %*% 4:6

    Therefore it is a 1x3 vector times a 3x1 vector --> a scalar

提交回复
热议问题