function index = searchList(thelist,name) %searchList - search for a name (string) in a list of objects % % Parameter: thelist The list to be searched % Parameter: name The name to search for % Returns: index A list of indexes that matches % % Example(s): % adslix = searchList(ex.tfplist,'ADSL'); % Find all ADSL tfplans % %% =========================================================================== %% =========================================================================== % Copyright (C): % 2005-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % CVS: $Id: searchList.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== % Change History % 2004-01-26 (ToNo) Created %% =========================================================================== len = length(thelist); index = []; for i=1:len, y=thelist{i}; if length(strfind(y.name, name))>0 index = [index i]; end; end