median no longer support uint8
4 ビュー (過去 30 日間)
古いコメントを表示
In matlab 2012a, why the median function doesn't support any more data types other than single or double?
2010b:
median(uint8([1 2 3]))
ans =
2
2012a:
median(uint8([1 2 3]))
Error using median (line 28)
First input must be single or double.
After all, median is defined for any data type...
0 件のコメント
回答 (1 件)
Image Analyst
2012 年 10 月 14 日
The simple fix/workaround is
output = median(single(yourUint8Data));
If that's going to be a problem for you then put in a feature request with the Mathworks.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!