필터 지우기
필터 지우기

How to show left over elements from array ?

조회 수: 3 (최근 30일)
Sunson29
Sunson29 2019년 6월 7일
댓글: Sunson29 2019년 6월 7일
Dear friends,
Lets assume i have target = [1 1 2 3 5 8 5 7 5 8 2 2 8], and another array is deleteElm=[3 5 7 8].
Now, I want to delete the elements in "deleteElm" from " target", and show left over elements without repeatition. So, the final out put will be [1 2], since 3 5 7 8 are the elements should be deleted in "target". Is there an efficiency way to do it? Thanks

채택된 답변

Walter Roberson
Walter Roberson 2019년 6월 7일
setdiff(target, deleteElm)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by