フィルターのクリア

numbering equal to 1 if the number is different from the previous one

2 ビュー (過去 30 日間)
Luca Re
Luca Re 2023 年 10 月 3 日
コメント済み: Luca Re 2023 年 10 月 3 日
the first element >0 i assign =1
in the subsequent elements if the number is different from the previous one then I put =1.. otherwise =0
a=[0 2 2 2 3 3 3 3 4 4 5 6 6 7 8 9 9 9 9 9 ]
[0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 1 0 0 0 0]
[SL: edited to pull the text out of the code segment.]
  3 件のコメント
Torsten
Torsten 2023 年 10 月 3 日
Hint:
You could try "diff" for a solution.
Luca Re
Luca Re 2023 年 10 月 3 日
thank

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by