function dm=getDM(traffic,modemlist); %% =========================================================================== % getDM - Finds index in traffic that match modemlist % % Parameter: modemlist: array of disturbed gui.modems (VDSL, ADSL etc) % Returns: index in traffic that matches modem1 or modem2 % % Example(s): % dm=getDM(traffic,['ADSL';'VDSL']); % % Algorithmic details: % % Reference: % %% =========================================================================== %% =========================================================================== % Copyright (C) 1999 by Telia Research AB, Lulea, Sweden; All rights reserved. % Project : FSAN duplex model % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % % CVS: $Id: getDM.m,v 1.9 2000/11/07 13:25:38 tono Exp $ %% =========================================================================== % Change History % 1999-01-05 (DaB) Created % 1999-01-07 (DaB) Fixed bug in indexing % 1999-02-04 (DaB) Changed input format % 1999-02-04 (DaB) Changed name to setDM % 1999-02-05 (ToNo) Changed name back to getDM % 2000-03-31 (UvAn) Changed gui.modems to modems % 2000-10-23 (GS) Modified for different lengths of service names %% =========================================================================== tmp=size(traffic); len=tmp(1); dm=[]; modems=str2mat(modemlist); systems=size(modems,1); for m=1:systems; for i=1:len, tmp=traffic(i,:); if strncmp(tmp{3},modems(m,:),length(tmp{3})), dm=[dm i]; end; end; end;