How do i find the maximum consecutively ones in a logical array?

for example an array after a logical test A= [ 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1]

 採用された回答

Birdman
Birdman 2018 年 3 月 28 日

1 投票

By using rcumsum.m from the following link:
Simply type
max(rcumsum(A))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConstruct and Work with Object Arrays についてさらに検索

質問済み:

2018 年 3 月 28 日

コメント済み:

2018 年 3 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by