Why do I receive an error when using HIST with integer data types?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!