MATLAB: Automatic summation of sub matrices

sub matricessumsummation

So I have a 16×200 matrix of 0's and 1's, I have
t = any(Y,1); fc = strfind(t, [0 1]) + 1; lc = strfind(t, [1 0]);
entered giving me the bookends of my sub matrices under fc and lc. How would I enable MATLAB to automatically sum the 1's in all of the 16 columns of whatever widths were dictated by the previous formula, and give me the sum of each sum matrix. This would be assuming that every time I run this there would be a different number of sub matrices in the 16×200 matrix of different sizes.
Thank you.

Best Answer

Sean's solution to your earlier question was fine, and the logic for the above would be much the same as the summing logic that Sean uses.