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 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Adam Danz
Adam Danz el 23 de Jul. de 2018
Editada: Adam Danz el 23 de Jul. de 2018
ismember()
all(ismember())

Más respuestas (0)

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by