MATLAB: Is there a way to use setdiff or any function to compare two data sets within a range of each other

comparisondatadatasetssetdiffStatistics and Machine Learning Toolbox

I have two large data sets that are equal in dimensions but not in variables. Also the variables are similar but not exact so setdiff returns every value in the smaller data set. I'd like to know is there a way to add some range into the setdiff function like setdiff(A,B<+-2,B<+-2)?

Best Answer

Starting in R2015a, there is a function ismembertol. You can use this and the set diff logic on idx.