X
3 次元の行列ポイント(X
はNx3
行列) があり、それらのポイントはクラスターに属しています。属するクラスターは、Nx1
ベクトルで指定されCluster
ます (1、2、3、... のような値を持ちます)。だから、私はそれをscatter3
次のようにプロットしています:
scatter3(X(:,1),X(:,2),X(:,3),15,Cluster)
正常に動作しますが、凡例を追加して、色付きのマーカーとそれが表すクラスターを表示したいと思います。
たとえば、3 つのクラスターがある場合、次のような凡例が必要です。
<blue o> - Cluster 1
<red o> - Cluster 2
<yellow o> - Cluster 3
助けてくれてどうもありがとう!