MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Counting consecutive 1s in a matrix 

This is an example of my matrix (mine is much bigger) 
Subject: Counting consecutive 1s in a matrix From: Bruno Luong Date: 1 Mar, 2011 15:41:21 Message: 2 of 6 
Possibly this might help: 
Subject: Counting consecutive 1s in a matrix From: Roger Stafford Date: 1 Mar, 2011 18:47:21 Message: 3 of 6 
"Craig " <gizmocraig@hotmail.co.uk> wrote in message <ikj2pa$hj1$1@fred.mathworks.com>... 
Subject: Counting consecutive 1s in a matrix From: Bruno Luong Date: 1 Mar, 2011 19:49:35 Message: 4 of 6 
Another way: 
Subject: Counting consecutive 1s in a matrix From: Craig Date: 10 Mar, 2011 19:08:08 Message: 5 of 6 
"Roger Stafford" wrote in message <ikjevp$o2l$1@fred.mathworks.com>... 
Subject: Counting consecutive 1s in a matrix From: Roger Stafford Date: 10 Mar, 2011 22:09:07 Message: 6 of 6 
"Craig " <gizmocraig@hotmail.co.uk> wrote in message <ilb7io$7fg$1@fred.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.