array. find if one element or another is in the array
Show older comments
Hi, I have to vectors A and B I want to find if the elements of B are in A if whatever of the elements of B are in A, I want to get a 1 in the position where the element is if not a 0
for example A=[1 2 3 4 5] B=[1 3] c= 1 0 1 0 0
thanks
Accepted Answer
More Answers (0)
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!