I have a vector A = [1 3 5 4 2]. I have a vector of the form B = [2 4 5]. How do I check if all the values in vector B are in vector A?

조회 수: 2 (최근 30일)
I have a vector A = [1 3 5 4 2]. I have a vector of the form B = [2 4 5]. How do I check if all the values in vector B are in vector A?

채택된 답변

Adam Danz
Adam Danz 2018년 7월 23일
편집: Adam Danz 2018년 7월 23일
ismember()
all(ismember())

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by