Grouping variable must be a vector or a character array

2 vues (au cours des 30 derniers jours)
med-sweng
med-sweng le 31 Déc 2013
Commenté : med-sweng le 31 Déc 2013
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.

Réponses (1)

Walter Roberson
Walter Roberson le 31 Déc 2013
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
  1 commentaire
med-sweng
med-sweng le 31 Déc 2013
Thanks for your reply. So, in this case, what do you suggest?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Price and Analyze Financial Instruments dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by