I have a matrix made up of column vectors with values that either take on 0 or 1. What I wish to achieve is to have some form of automated process that creates a parsimonious structure to display the result. That is the process will create the result vectors v1,v2,v3,v4,v5 that correspond to the number of consecutive 1's in each sequence for each column variable.
For instance d=
0 1 1 1 1
1 1 0 0 0
1 1 1 0 1
0 0 0 0 0
1 1 0 1 1
And we get v1=[2,1] v2=[3,1] v3=[1,1] v4=[1,1] v5=[1,1,1]