更新时间:2022-04-28 22:02:52
Numpy documentation states that the operator you apply performs element-wise multiplication.
但是,MATLAB中的 mtimes
会进行矩阵乘法
However, mtimes
in MATLAB does matrix multiplication.
要进行验证,MATLAB逐元素乘法的语法会产生与numpy中相同的结果:
To verify, MATLAB syntax for element-wise multiplication produces the same result you see in numpy:
disp(x.'.*x)
4 56 20 54 4
56 9 7 42 80
20 7 9 100 2
54 42 100 1 40
4 80 2 40 81