MTIMES (*) is not fully supported for integer classes. At least one argument must be scalar

15 Ansichten (letzte 30 Tage)
Dear members
I have a matrix H of type uint8 and a vector V of type double
When I make
D=mod(H*V,2);
I get an error : MTIMES (*) is not fully supported for integer classes. At least one argument must be scalar
I tried to convert the matrix from uint8 to double by making :
H=double(H);
but it doesn't work. How can I fixe the problem please
  1 Kommentar
Stephen23
Stephen23 am 7 Jun. 2021
What does "but it doesn't work" mean exactly? Does it throw an error message? (if so, what is the complete error message?) Or do you get an unexpected value? (if so, please upload sample data by clicking the paperclip button).

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Chunru
Chunru am 7 Jun. 2021
Try convert H to double first.
D=mod(double(H)*V,2);
  4 Kommentare
Chunru
Chunru am 9 Jun. 2021
Then the following command should be correct:
D=mod(double(H)*V,2);
You may want to post the portion of code that give the error, together with the code generate H and V.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by