How to delete repeating value in a row ?

3 ビュー (過去 30 日間)
omran alshalabi
omran alshalabi 2022 年 8 月 28 日
コメント済み: omran alshalabi 2022 年 8 月 28 日
code: from a = [1 2 2 4 4 2 2 1 1 4 4 ]
become b = [1 2 4 2 1 4]

採用された回答

Bruno Luong
Bruno Luong 2022 年 8 月 28 日
a = [1 2 2 4 4 2 2 1 1 4 4 ]
a = 1×11
1 2 2 4 4 2 2 1 1 4 4
b = a([true diff(a)~=0])
b = 1×6
1 2 4 2 1 4
  1 件のコメント
omran alshalabi
omran alshalabi 2022 年 8 月 28 日
Thank you very much mr. Bruno Luong for your fast response.
It is function very good.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by