[討論] 關於kmeans使用方法
kmeans在官網上的範例我試著跑過,過程如下
首先是load一個內建資料庫
load fisheriris
X = meas(:,3:4);
figure;
plot(X(:,1),X(:,2),'k*','MarkerSize',5);
title 'Fisher''s Iris Data';
xlabel 'Petal Lengths (cm)';
ylabel 'Petal Widths (cm)';
https://imgur.com/Xx0WSXl

接下來就是用kmeans分群
rng(1); % For reproducibility
[idx,C] = kmeans(X,3);
結果就是以下error
https://imgur.com/0vCDzY9

有人知道是怎麼回事嗎
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.41.56
※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1460425000.A.719.html
推
04/12 21:11, , 1F
04/12 21:11, 1F
可以請問你是用哪個版本的matlab嗎
※ 編輯: aibltjv (180.217.154.29), 04/13/2016 01:10:19
→
04/13 21:09, , 2F
04/13 21:09, 2F
→
04/13 23:57, , 3F
04/13 23:57, 3F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章