Finding multiple locations in a vector

I was hoping someone could help, I am trying to use the find function to give me the location of the values of a vector in a larger vector.
ie
[a,b] = find(A==B);
where A is 300 by 1 and B is 20 by 1 but obviously I get an error because B is not a single value. Is there another function that I can use?

回答(2 个)

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

标签

提问:

2015-10-5

Community Treasure Hunt

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

Start Hunting!

Translated by