level 1
请高手帮忙看一下下面的这个:
a:=vector([2,1,-1]);
b:=vector([1,-1,2]);
crossprod(a,b);
求的是两个向量的向量积,运行出来是这样的,不能算出最终结果
a:=vector([2,1,-1]);
a := [2, 1, -1]
> b:=vector([1,-1,2]);
b := [1, -1, 2]
> crossprod(a,b);
crossprod(a, b)
>
>
2010年04月17日 08点04分
1
level 0
a:=Vector([2,1,-1]);
b:=Vector([1,-1,2]);
# 这里Vector要大写,因为如果用小写的vector,会使用table结构,但是如果使用大写的Vector,将会使用RTable结构
LinearAlgebra[CrossProduct](a,b);
最后得到
[1 -5 -3]
2010年04月17日 12点04分
2