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
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 CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by