Function Reference
— Function File: [idxvec, errmsg] = cellidx (listvar, strlist)

Return indices of string entries in listvar that match strings in strlist.

Both listvar and strlist may be passed as strings or string matrices. If they are passed as string matrices, each entry is processed by deblank prior to searching for the entries.

The first output is the vector of indices in listvar.

If strlist contains a string not in listvar, then an error message is returned in errmsg. If only one output argument is requested, then cellidx prints errmsg to the screen and exits with an error.