Kmeans does not accept complex numbers
4 ビュー (過去 30 日間)
古いコメントを表示
Why do Matlab says that kmeans does not accept complex data when my data are not complex numbers?
2 件のコメント
KSSV
2019 年 6 月 20 日
May be your data has a complex number.
Check:
nnz(~isreal(data))
If the above gives some number, it means your data has complex numbers.
Walter Roberson
2019 年 6 月 20 日
Put a condition breakpoint on the line that calls kmeans, testing your data. Suppose that your data to be clustered is named Data, then the breakpoint condition could be
any(imag(Data(:)))
and run your code. The problem does not necessarily happen immediately.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!