find number of zeros in an array
2 次查看(过去 30 天)
显示 更早的评论
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)
采纳的回答
Rik
2021-12-10
Get the RunLength function by Jan from the file exchange.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!