Hi. I have a matrix of 1's and 0's and I want to set a counter to search for the 1's and add them up and stop when it gets to a 0, and start again at the next 1.
For example [0;1;1;1;0;0;0;0;1;1;0;0;0;1]. I expect the counter to solve and obtain [3;2;1]. Thanks.
Best Answer