Problems with plotting array with saved data

조회 수: 5 (최근 30일)
Gabriel
Gabriel 2016년 2월 8일
댓글: KSSV 2016년 2월 9일
Hi guys, I am kinda new to Matlab and i think I may be facing a stupid problem.
In the code bellow, I use Kmeans to cluster some data and save the results and in the same loop I use CalinskiHarabasz criterion to get its value and I store it in the CH variable.
But when I try to plot CH, I only get a blank graph. How can I fix it ?
Thanks in Advance !
imp = xlsread('Academia.xlsx');
%%Loop Kmeans K clusters
k=10
for i=1:k
[idx,C]=kmeans(imp,i);
M{i}=idx;
eva = evalclusters(imp, 'kmeans', 'CalinskiHarabasz','Klist',i)
CH{i}=eva.CriterionValues
end
  댓글 수: 1
KSSV
KSSV 2016년 2월 9일
You want to plot CH w.r.t what? I tried plotting CH w.r.t it's indices, I got a plot, attached here. Make CH a matrix not a cell.

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

답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by