連続した同じ数字をカウントアップする方法
Ältere Kommentare anzeigen
例えば、
[0]と[1]の配列
[0 0 0 1 1 1 0 0 1]
連続した数字をカウントアップする方法を教えていただけないでしょうか。
連続が途切れた場合は1に戻る。
上の例ですと
[1 2 3 1 2 3 1 2 1]
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu インストールとライセンスの紹介 finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!