how to extract different values/elements of matrix or vector without repeating?

Hello,
I have a vector/ or it could be array : A = [1,2,3,4,5,1,2,3,4,5,1,2,3] I want to extract existing different values/elements from this vector without repeating: 1,2,3,4,5 B= [1,2,3,4,5]
How can I extract it ?
I would appreciate for any help please

 採用された回答

Stephen23
Stephen23 2017 年 2 月 8 日
>> A = [1,2,3,4,5,1,2,3,4,5,1,2,3];
>> unique(A)
ans =
1 2 3 4 5

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2017 年 2 月 8 日

コメント済み:

2017 年 2 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by