MATLAB: Error-undefined function ‘eq’

matrix

if any(A==B)
message = sprintf('The B value of %d is in A.', B);
uiwait(msgbox(message));
end
i get error as
Undefined function or method 'eq' for input arguments of type 'struct'.
Error in ==> main_final at 100
if any(A==B)
A=load('Video_database.dat','-mat');
i A i have 3 values ,in B 2 values
please help

Best Answer

You can't use this kind of comparison on structure arrays.
It sounds like you can use ismember() but you have to make the comparison outside of a structure array.
For example:
A = 1:3;
B = 2;
if any(ismember(A,B))
disp('True');
else
disp('False');
end
I realize you are trying to also capture the similar values, (not the simple thing I have done), but the main problem you are facing is trying to make the comparison directly on structure arrays.