Why do I receive an error when using HIST with integer data types?
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Numeric Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!