Find pattern of ones
Show older comments
I have a matrix of ones and zeros for example: A=[ 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 ];
I need to find the number of patterns of [1 1 1 1] without overlapping. So, for example the matrix [1 1 1 1 1 1 1 1] should be considered to have 2 patterns and the matrix [1 1 1 1 1 1] should be considered to have only 1 pattern. Can anyone help? Thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Discrete Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!