필터 지우기
필터 지우기

How to exclude specific values from a vector?

조회 수: 112 (최근 30일)
Louis
Louis 2013년 6월 10일
댓글: Mehri Mehrnia 2021년 8월 17일
I have two arrays of unmatching sizes.
For example: A=[1;2;3;4;5;7;14;76;89] B=[2;3;14]
What I would like as an output is a new vector which has all the values from A excluding values from B. So C=[1;4;5;7;76;89] I am unable to overcome unmatching dimension issues with my basic matlab skills :(
Any help would be really appreciated!

채택된 답변

Iain
Iain 2013년 6월 10일
C = setdiff(A,B);

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by