seqmatch

Find matches for every string in a library

Syntax

Index = seqmatch(Strings, Library)

Description

Index = seqmatch(Strings, Library) looks through the elements of Library to find strings that begin with every string in Strings. Index contains the index to the first occurrence for every string in the query. Strings and Library must be cell arrays of strings.

Examples

lib = {'VIPS_HUMAN', 'SCCR_RABIT', 'CALR_PIG' ,'VIPR_RAT', 'PACR_MOUSE'};
query = {'CALR','VIP'};
h = seqmatch(query,lib);
lib(h) 

See Also

MATLAB functions strmatch, regexpi


© 1994-2005 The MathWorks, Inc.