manipulate a method contain to compare two lists
Show older comments
l have trouble with the code below. l want to compare two lists of elements to : 1)know wether the neighbours of j are included in k 2)know wether the set of j is equal to k
but matlab returns me an error
if (contains(neighbour_n{k}, neighbour_n{j})||(neighbour_n{j}==neighbour_n{k}));
Undefined function or method 'contains' for input arguments of type 'double'.
Accepted Answer
More Answers (2)
Jan
on 8 Mar 2015
0 votes
The error message tells you, that there is no function called "contains". Why do you assume that there is such a function?
Are you sure that you need the elementwise comparison "==" or would isequal be better?
mazari ahmed
on 14 Mar 2015
Categories
Find more on Logical 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!