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

MATLAB

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

Best Answer

Try convert H to double first.
D=mod(double(H)*V,2);