如何编写可以计算两个向量的叉积的代码?这两个向量都是1×5向量 起初,我编写类似
的代码a=randn(1,5);
b=randn(1,5);
cross_c=cross(a,b)
或
a=randn(1,5);
b=randn(1,5);
cross_c=cross(a,b,5)
但是窗口总是向我显示
A and B must be of length 3 in the
dimension in which the cross
product is taken.
我该如何编写代码来计算这两个1 x 5向量的叉积?
我的matlab版本是2015b