clustering of rows in random manner

10 views (last 30 days)
jaah navi
jaah navi on 20 Dec 2017
Commented: jaah navi on 20 Dec 2017
If I have a matrix of 50 rows and 100 columns how clustering of 50 rows can be done in a random manner such that the rows present in that corresponding cluster must have similar values.
  2 Comments
Jos (10584)
Jos (10584) on 20 Dec 2017
This is all quite vague ... what do you mean by " clustering ", " random manner " " corresponding " (to what?), and " similar values "?
Perhaps you can give a small example of a matrix with, for instance, 6 rows and 2 columns, and the expected output?
jaah navi
jaah navi on 20 Dec 2017
Here comes the example if A=[1 0;0 2;0 3;0 0;0 0;6 0]
i want to have the output as B=[1 3;6 2;1 3;1 3;1 3;6 2]
which indicates row1,3,4,5 are clustered as a result they have similar values whereas row2,6 are clustered as a result they have similar values.

Sign in to comment.

Accepted Answer

KSSV
KSSV on 20 Dec 2017
Have a look on randsample and randperm.
  1 Comment
jaah navi
jaah navi on 20 Dec 2017
could you please tell me how to use randsample and randperm commands as i am new to matlab and still learning it.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!