I Want to perform element wise matrix multiplication
Show older comments
I have used the following code but getting an error message
I1=imread('abc.gif');
a=I1(1:3,1:3);
b=[-3 4 5;6 -7 1;-2 -4 -6];
c=a.*b;
The error message obtained is listed below Error using .* Integers can only be combined with integers of the same class, or scalar doubles.
How to clear this error
1 Comment
Stephen23
on 12 Jun 2017
"I Want to perform element wise matrix multiplication"
This is a contradiction in terms: in MATLAB it is possible to perform element-wise multiplication OR matrix multiplication, but not both at the same time:
Accepted Answer
More Answers (1)
Muhammed Musa
on 26 Nov 2020
0 votes
A = [1 2 3 4];
B = [9 8 7 6];
A.*B =
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!