MATLAB: Mtimes error when multiply a constant with a matrix

integrationtimes

[maxF loc]=max(F(:));
[row col]=size(F);
%create a matrix max
G=(128-maxF).*ones(row,col);
??? Error using ==> times
Integers can only be combined with
integers of the same class, or scalar
doubles.
Error in ==> Mor at 24
G=(128-maxF).*ones(row,col);
help me

Best Answer

G=(128-double(maxF)).*ones(row,col);