why does my program terminate
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hiwhile i run this program my programhangs on ,dont now why,can anyone help me please
Fuzzification
[nu da]=xlsread('lymphoma dataset.xls')
cl=xlsread('class.xls');
for i=1:size(da,1)
for j=2:size(da,2)
if(j<size(da,2))
% x=str2num(da{i,j});
% if(isempty(x))
% x=0;
% end
else
c=unique(da(:,end));
% for i1=1:length(c)
% if(strcmp(c{i1},da{i,j}))
% x=i1;
% end
% end
% end
data(i,j-1)=x;
end
end
data1=data;
% data=data(1:300,:);
% cl=cl(1:150,:);
% data=nu;
disp('Dataset')
disp(data)
data=knnimpute(da)
[in claq]=kmeans(data,4);
for i=1:size(da,2)
d=data(:,i);
Emin=min(d);
Emax=max(d);
d1=sort(d,'ascend');
s=size(d,1)/3;
pj1=d(1:s,:);
pj2=d(s+1:end,:);
cl=in;
cla1=cl(1:s,:);
cla2=cl(s+1:end,:);
nc=10;
de=1;
k1 = mat2cell(pj1, nc*ones(1, (s/nc)),1);
k2 = mat2cell(pj2, nc*ones(1, (size(pj2,1)/nc)),1);
Rk1=(2*1)/length(pj1);
Rk2=(2*2)/length(pj2);
%class
figure('visible','off')
h = cdfplot(cla1);
y = get(h,'YData');
f1=length(y);
y = unique(y);
h1 = cdfplot(cla2);
y1 = get(h1,'YData');
f2=length(y1);
y1 = unique(y1);
low1=y(2);
low2=y1(2);
cf1=y(2)-y(1);
cf2=y1(2)-y1(1);
Pj1=low1+((Rk1-cf1)/f1)*de;
Pj2=low2+((Rk2-cf2)/f2)*de;
Aj1(i)=(Emin+ Pj1)/2;
Aj2(i) =(Pj1 + Pj2 )/2;
Aj3(i)= (Pj2 + Emax )/2;
end
댓글 수: 3
Andrew Newell
2011년 9월 16일
Please format your code so we can read it (see http://www.mathworks.com/matlabcentral/answers/7885-tutorial-how-to-format-your-question).
Andreas Goser
2011년 9월 16일
And also be specific about "terminate"
Jan
2011년 9월 18일
@Pat: You've asked 41 questions now. I'd expect that you've learned how to ask good questions and how to format your code. If you interested in getting answers, make your question easy to understand and to read would be a good idea.
답변 (1개)
Vineeth Kartha
2016년 5월 3일
0 개 추천
Hi,
Insert breakpoints at each xlsread command and see if it is one of the xlsread that is causing the problem.
Regards Vineeth
댓글 수: 1
Jan
2016년 5월 3일
@Vineeth Kartha: Did you see that the question is 5.5 years old and that the OP did not reply to questions for clarifications? I assume he was not interested in a solution.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!