find number of zeros in an array
5 views (last 30 days)
Show older comments
data = [ 0 0 0 1 1 0 0 0 0 0 0 1 1 1]
%need the outpout as : length of each zero= (3,6) length of each ones = (2,4)
Accepted Answer
Rik
on 10 Dec 2021
Get the RunLength function by Jan from the file exchange.
More Answers (0)
See Also
Categories
Find more on Text Files in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!