Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:match_str [2018/08/23 14:43] (current)
Line 1: Line 1:
 +=====  MATCH_STR =====
 +
 +Note that this reference documentation is identical to the help that is displayed in MATLAB when you type "help match_str"​.
 +
 +<​html><​pre>​
 +  <a href=/​reference/​match_str><​font color=green>​MATCH_STR</​font></​a>​ looks for matching labels in two lists of strings
 +  and returns the indices into both the 1st and 2nd list of the matches.
 +  They will be ordered according to the first input argument.
 + 
 +  Use as
 +    [sel1, sel2] = match_str(strlist1,​ strlist2)
 + 
 +  The strings can be stored as a char matrix or as an vertical array of
 +  cells, the matching is done for each row.
 + 
 +  When including a 1 as the third input argument, the output lists of
 +  indices will be expanded to the size of the largest input argument.
 +  Entries that occur only in one of the two inputs will correspond to a 0
 +  in the output, in this case. This can be convenient in rare cases if the
 +  size of the input lists is meaningful.
 +</​pre></​html>​