how can i give the 1 by 173 matrix as input to the k means clustering algorithm.

3 次查看(过去 30 天)
how can i give the 1 by 173 matrix as input to the k means clustering algorithm. is this code correct??? but am getting error as Index exceeds matrix dimension.
code clc X=load('D:\Viji\MATLAB\hist\e_dist.txt'); a=X(1,:); [idx,ctrs] = kmeans(a,3); plot(a(idx==1,1),'r.','MarkerSize',12); hold on plot(a(idx==2,1),'g.','MarkerSize',12); plot(a(idx==3,1),'b.','MarkerSize',12);
thank you.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by