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

7 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by