Why do I receive an error when using HIST with integer data types?
Mostrar comentarios más antiguos
The HIST function does not appear to work with integer data types in MATLAB 7.2 (R2006a). I enter the following code at the MATLAB Command Prompt:
y = uint8(10*rand(1000,1));
hist(y)
I receive the error message:
??? Error using ==> mtimes
Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> hist at 73
xx = miny + binwidth*(0:x);
I would like to create a histogram from UINT8, UINT16, and UINT32 data.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Numeric Types en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!