I have a large array 15x15x2200. THis is merely a collection of 15x15 sparse matrices depicting the links between 15 nodes and how they vary over 2200 time units. I need to calculate for how much time does each link persist. By this I mean, suppose A[4,11] is 0 till time unit 5 and stays 1 till time unit 20 and then becomes 0 and again becomes 1 from 42 to 46, I would like to have an array of this information into an array which stores these lengths separately like LEN = {...15, 4, ....}
I am trying to do this in matlab and then generate a histogram. What is the best way to do this?