If A is a matrix of (n,m) how to group n(rows) in a random manner such that the values present in (n) in each row should be in all the rows present in that corresponding group.say for exampleif A=(5,3)and it has the value of [1 0 0;0 2 0;3 0 0;0 0 4;0 5 0]after grouping in a random manner it should be [1 5 4;3 2 0;3 2 0;1 5 4;1 5 4](in this example row1,row4 and row5 are in one group where as row2 and row3 are in another group).The same scenario should be applied to (n,m) indicates n number of rows and m number of columns.
MATLAB: Please help me to get with the scenerio mentioned
matrix manipulation
Related Question
- Create a randomized grouping matrix using one-liner
- How grouping of users can be done
- Putting similar numbers into groups within an array
- How to delete a row in a matrix
- How to sort an array into groups with a minimum of 1 entry per group
- Sum if multiple conditions satisfied across vectors
- Divide group into subgroups
Best Answer