How to Split the K-means clusters into a matrix.

After getting my clusters as idx'
ans =
1 1 1 1 1 1 1 3 3 3 3 3 2 2 2 2 2 2
i am having an issue converting it into a 7*3 matrix with zeroes to fill the empty slots. with each column being a cluster. vec2mat/reshape helps but doesnt fill it apropriately

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Centre d'aide et File Exchange

Produits

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by