Grouping variable must be a vector or a character array
3 次查看(过去 30 天)
显示 更早的评论
I have done the following:
I=imread('image.png');
I2=im2double(I);
cidx = fcm(I2,5);
When I tried running the following command:
silhouette(I2,cidx)
I got the following error:
Error using grp2idx (line 39)
Grouping variable must be a vector or a character array.
Error in silhouette (line 79)
[idx,cnames] = grp2idx(clust);
How can I solve this issue?
Thanks.
0 个评论
回答(1 个)
Walter Roberson
2013-12-31
The first output of fcm() is centroid coordinates, not membership information. Membership information would appear in the second output. See the example at http://www.mathworks.com/help/fuzzy/fcm.html
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Price and Analyze Financial Instruments 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!