matlab矩阵相乘的问题,4*1的A乘以4*4的B乘以1*4的C为什么会错!B =51 51 51 5252 52 52 5253 54 53 5355 55 54 54A =-0.0329 0.2359 0.9259 -0.1290C =-0.01010.99980.0105-0.0001A*B*C的话会有错误Error using * MTIMES is not fully supporte
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 03:56:38
matlab矩阵相乘的问题,4*1的A乘以4*4的B乘以1*4的C为什么会错!B =51 51 51 5252 52 52 5253 54 53 5355 55 54 54A =-0.0329 0.2359 0.9259 -0.1290C =-0.01010.99980.0105-0.0001A*B*C的话会有错误Error using * MTIMES is not fully supporte
matlab矩阵相乘的问题,4*1的A乘以4*4的B乘以1*4的C为什么会错!
B =
51 51 51 52
52 52 52 52
53 54 53 53
55 55 54 54
A =
-0.0329 0.2359 0.9259 -0.1290
C =
-0.0101
0.9998
0.0105
-0.0001
A*B*C的话会有错误
Error using *
MTIMES is not fully supported for integer classes.At least one input must be scalar.
To compute elementwise TIMES,use TIMES (.*) instead.
matlab矩阵相乘的问题,4*1的A乘以4*4的B乘以1*4的C为什么会错!B =51 51 51 5252 52 52 5253 54 53 5355 55 54 54A =-0.0329 0.2359 0.9259 -0.1290C =-0.01010.99980.0105-0.0001A*B*C的话会有错误Error using * MTIMES is not fully supporte
你那个B是个int型的数组,在进行运算前,需要转换成double型数组.
也就是在相乘之前加上:
B=double(B);