how to find the line number of a point in a vector
3 ビュー (過去 30 日間)
古いコメントを表示
I have a vector i=[0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0].
What can I use to find in which line number starts and ends number 1 each time?
0 件のコメント
採用された回答
その他の回答 (1 件)
Fangjun Jiang
2019 年 9 月 4 日
編集済み: Fangjun Jiang
2019 年 9 月 4 日
a=diff(i)
find(a==1)
find(a==-1)
adjust by 1
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Modulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!