Consecutive Ones

Finds the number of consecutive ones in a binary signal. Returns the starting and ending points

You are now following this Submission

Finds the number of consecutive ones in a binary signal. Returns the starting and ending points of the consecutive set and also the count. Since it does not use any for loop. It is pretty fast

Cite As

Shreyes (2026). Consecutive Ones (https://www.mathworks.com/matlabcentral/fileexchange/34914-consecutive-ones), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0