aman2909
aman2909

Reputation: 13

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?

Upvotes: 0

Views: 39

Answers (1)

Cris Luengo
Cris Luengo

Reputation: 60494

.* is not matrix multiplication, it is element-wise multiplication. You want to do A*x.

Upvotes: 1

Related Questions