필터 지우기
필터 지우기

How to get Fuzzy C-Means working?

조회 수: 1 (최근 30일)
Z
Z 2013년 7월 8일
Hello, I have the following code and my graph is entirely blue and sometimes it's just blank because the "iteration count" comes out as Nan. Is it because of my file type? How can I fix this?
fid=fopen('all_classes_withns_dmjd.txt');
myimport=textscan(fid,'%s %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f','Headerlines',1);
fclose(fid);
mydata=cell2mat(myimport(:,2:29));
data = mydata(1:1016,:);
[center,U,obj_fcn] = fcm(data, 2);
plot(data(:,1), data(:,2),'o');
maxU = max(U);
index1 = find(U(1,:) == maxU);
index2 = find(U(2, :) == maxU);
line(data(index1,1),data(index1, 2),'linestyle','none','marker','*','color','g');
line(data(index2,1),data(index2, 2),'linestyle','none','marker','*','color','r');
Thanks in advance!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Clustering에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by