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