Function: table_ismember

CALL:

[tf,f]=table_ismember(table1,table2) [tf,f]=table_ismember(table1,table2,NaNisequal) [tf,f]=table_ismember(table1,table2,keys1) [tf,f]=table_ismember(table1,table2,keys1,NaNisequal) [tf,f]=table_ismember(table1,table2,keys1,keys2) [tf,f]=table_ismember(table1,table2,keys1,keys,NaNisequal)

DESCRIPTION:

function [tf,f]=table_ismember(table1,table2,keys1,keys2,NaNisequal) find location of rows of table1 in rows of table2

INPUT:

table1 any
first structure of arrays (tablestructure)
+----fld1(N1,:)
+----fld2(N1,:)
table2 any
      second structure of arrays (tablestructure)
      +----fld1(N2,:)
      +----fld2(N2,:)
keys1,keys:
      cell array of column names.
      keys1 must be columns of table1 and keys2 must be columns in
      table2.
      if keys2 is not specified, it is assumed that keys2=keys1.
      columns table.keys1 are compared to columns table.keys2.
NaNisequal any
if true, treat NaN values as equal. Note that "ismember" does
NOT treat NaN's as equal. Defaults to false.

OUTPUT:

      tf[N1,1]
          boolean vector corresponding to table1.
          tf(i)=true indicates row(i) is in table 2
      f([N1,1]
          table-to-table indices:
          0 if not found. Otherwise: corresponding element in table2

REVISIONS any
20200611: checked for use with R2016b strings.
20211116: implement "NaNisequal" correctly. simplify parsing of input
          arguments.