Home > freetb4matlab > general > cellidx.m

cellidx

PURPOSE ^

% Return indices of string entries in @var{listvar} that match strings

SYNOPSIS ^

function [idxvec,errmsg] = cellidx (listvar, strlist)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{idxvec}, @var{errmsg}] =} cellidx (@var{listvar}, @var{strlist})
% Return indices of string entries in @var{listvar} that match strings
% in @var{strlist}.
%
% Both @var{listvar} and @var{strlist} may be passed as strings or
% string matrices.  If they are passed as string matrices, each entry
% is processed by @code{deblank} prior to searching for the entries.
%
% The first output is the vector of indices in @var{listvar}.
%
% If @var{strlist} contains a string not in @var{listvar}, then
% an error message is returned in @var{errmsg}.  If only one output
% argument is requested, then @var{cellidx} prints @var{errmsg} to the
% screen and exits with an error.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003