I have a table as below:

```
  1 2 3 4 5 6 . . . .
1 1 0 0 0 1 0 . . . .
2 0 0 1 1 1 1 . . . .
3 0 1 0 0 0 1 . . . .
4 1 0 0 0 0 0 . . . .
5 0 0 1 0 1 0 . . . .
. . . . . . . . . . .
. . .
. .
.

```

1,2,.... are title of rows and columns. I need to index into table this means that : 
one array (vector) that index into row1 that is contain 1 (=column 1 because in table cell(1,1) is true). another array that index into row2 that is contain 3,4,5,6 (because cells (2,3),(2,4),(2,5),(2,6) are true) and etc ...

I read [Compact MATLAB matrix indexing notation](https://stackoverflow.com/questions/792683/compact-matlab-matrix-indexing-notation) and [Use a vector as an index to a matrix](https://stackoverflow.com/questions/5904488/use-a-vector-as-an-index-to-a-matrix) with accuracy but I can not write code for it work.