Grouping variable must be a vector or a character array

조회 수: 2 (최근 30일)
med-sweng
med-sweng 2013년 12월 31일
댓글: med-sweng 2013년 12월 31일
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.

답변 (1개)

Walter Roberson
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
  댓글 수: 1
med-sweng
med-sweng 2013년 12월 31일
Thanks for your reply. So, in this case, what do you suggest?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by