This is a great addition. I'm surprised this isn't part of the core Matlab. A useful note to users is that whereas the ismember documentation specifies that loc is an array "containing the highest index in S for each element in A that is a member of S", ismemberf does not guarantee the highest index. That might be a nice feature to add. Or is there a different index that can be guaranteed (e.g., the lowest)?
This behavior is known (but not documented) due to the use of HISTC as you have correctly pointed out. User should never rely on the threshold tolerance in order to discriminate floats through exact comparison. Please enlarge the tolerance or add point to set member to work around.
Beside the fact, that this is of practical use and works as expected, it helps to answer dozens of questions in the newsgroup: why does ANY((0:0.1:1) == 0.3) reply FALSE???
The help is complete and descriptive, contains author and date, exact and really useful comments. The H1-line is not helpful.
Minor bug in line 125: if ndims(A) ~= 2 || ndims(A) ~= 2. A simple [tf, loc] output might be more efficient than the VARARGOUT/Cell/DEAL/MIN/MAX/NARGOUT constructions.
PROBLEM: ismemberf([0 1 2], 0) will return [0 0 0]. It seems this is because line 263 will auto-configure tol to zero which causes unexpected results in ihi (line 274) that causes tf to be set incorrectly in line 276.
WORK-AROUND: This behavior can be avoided if 'tol' is explicitly set when calling ismemberf().
16 Mar 2009
Extend ISMEMBERF to complex arrays
19 Mar 2009
Important change in the engine when using 'rows' option, which saves the runtime by about 30%. Some adjustment with automatic tolerance.
10 Oct 2009
Correct bug reported by David
13 Oct 2009
Correct bug reported by Jan, better description in H1 line (thanks)
23 Oct 2010
Complete H1 lines with specification of LOC and membership criteria