필터 지우기
필터 지우기

Find missing elements of a vector

조회 수: 9 (최근 30일)
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019년 12월 10일
답변: JESUS DAVID ARIZA ROYETH 2019년 12월 10일
Hi all,
I have a vector =1:1:80;
I have a vector with these numbers=[ 1 3 5 12 34 44 55 62 63 68 69 70 72 75 79];
How can I get the missing elements of the initial vector in anothrer vector?
the other vector will be = [2 4 6 7 8 9 10 11 13 etc.]
thanks a lot
Nikolas

채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 12월 10일
vector =1:1:80;
numbers=[ 1 3 5 12 34 44 55 62 63 68 69 70 72 75 79];
another = setdiff(vector,numbers)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by