'Matrix multiplication using sym function error in MATLAB
When multiplied A = eye(3,3)
with x = sym('x',[3,3])
as in this form (A.*x)
, I got a result. But when multiply A = eye(3,3)
with y = sym('y',[3,2])
I got an error while from the matrix multiplication point of view it is correct. Why it is so?
Solution 1:[1]
.*
is not matrix multiplication, it is element-wise multiplication. You want to do A*x
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Cris Luengo |