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

16 ビュー (過去 30 日間)
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 件のコメント
Stephen23
Stephen23 2021 年 6 月 7 日
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).

サインインしてコメントする。

採用された回答

Chunru
Chunru 2021 年 6 月 7 日
Try convert H to double first.
D=mod(double(H)*V,2);
  4 件のコメント
Afluo Raoual
Afluo Raoual 2021 年 6 月 8 日
class(H)
ans =
'uint8'
classe(V)
ans =
'double'
Chunru
Chunru 2021 年 6 月 9 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by