I have in Matlab a cell named: elem
[36 29]
[]
[30 29]
[30 18]
[]
[31 29]
[]
[]
[8 9]
[32 30]
and a matrix named: conn
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
and i want to make 2 new matrices which will contain only the elements that correspond to non-empty cells of elem without using a for loop. For example the correct result would be:
29 36
29 30
18 30
29 31
8 9
30 32
and:
1 2
1 4
1 5
2 4
3 5
4 5
Any help would be greatly appreciated.