How can I create this simple matrix?

DNdog =
108
108
107
107
23
23
y = 108 %How do I get the above matrix to this state?
107
23

 採用された回答

Thorsten
Thorsten 2017 年 4 月 13 日

0 投票

Using
unique

4 件のコメント

Muhendisleksi
Muhendisleksi 2017 年 4 月 13 日
編集済み: Muhendisleksi 2017 年 4 月 13 日
y = 23 %This is happening.
107
108
y = 108 %I want it to be like this.
107
23
Star Strider
Star Strider 2017 年 4 月 13 日
Use 'stable' as the set order specifier:
y = unique(DNdog, 'stable')
Muhendisleksi
Muhendisleksi 2017 年 4 月 13 日
thanks!
Star Strider
Star Strider 2017 年 4 月 13 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by