Main Content

seqmatch

Find matches for every character vector in library

Syntax

Index = seqmatch(keyword, Library)

Description

Index = seqmatch(keyword, Library) looks through Library to find character vectors or string that begin with keyword. Index contains the index to the first occurrence for every character vector or string in the query. keyword and Library must be cell arrays of character vectors or string vectors.

Examples

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

    'CALR_PIG'    'VIPS_HUMAN'

Version History

Introduced before R2006a

See Also

|