Why do I receive an error when using HIST with integer data types?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Numeric Types dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!