필터 지우기
필터 지우기

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

조회 수: 6 (최근 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에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by