Why does KMEANS give an error when using integer data types?
7 ビュー (過去 30 日間)
古いコメントを表示
When I attempt to cluster my integer data using KMEANS, I receive the following error
??? Error using ==> minus
Integers can only be combined with integers of the same class, or scalar doubles.
採用された回答
MathWorks Support Team
2010 年 6 月 28 日
This error is the expected behavior for passing an integer data type to the KMEANS function. KMEANS and many other statistical functions are not designed to work with integer data in MATLAB 7.2 (R2006a).
The only workaround is to convert the integer data to a double data type before passing it to KMEANS. For more information, refer the following documentation page on the DOUBLE function:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html>
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!