Count the occurrence of consecutive 1s in 0-1 data in MATLAB

后端 未结 4 1935
后悔当初
后悔当初 2020-12-06 02:59

I have a set of 1s and 0s. How do I count the maximum number of consecutive 1s?

(For example, x = [ 1 1 0 0 1 1 0 0 0 1 0 0 1 1 1 ....]). Here the answe

4条回答
提交回复
热议问题