Is there any built in Matlab function that can compare arrays in the following manner?
function comparison = elementcompare(array1,array2)
comparison=logical(true);
for i=1:length(array1)
if ~any(array1(i)==array2)
comparison=logical(false);
end
end
This comparison, which returns true if every element of array1 can be found in array2, seems pretty basic but I was not able to find it.
Thanks!