Subtracting a Vector from a Scalar-Multiplied Matrix
Show older comments
Let's say that we have the following two matrices
and we want to calculate
. We know that it is not defined, but MATLAB gives me the following result.Could anyone explain me why that happens?
C=[1 2; 2 1]
E=[1;2]
3*C-E
5 Comments
Athanasios Paraskevopoulos
on 4 Apr 2024
Torsten
on 4 Apr 2024
Why do you write it is not defined ? It is defined (in MATLAB) and is the same as if E were set to
E = [1 1;2 2]
Athanasios Paraskevopoulos
on 4 Apr 2024
Torsten
on 5 Apr 2024
It's just a convention to get rid of the bsxfun - there is nothing to explain (or even justify).
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!