function dm=getDM(traffic,modemlist); %% =========================================================================== % getDM - Finds index in traffic that match modemlist % % Parameter: modemlist: array of disturbed 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.B.Nordstrom@Telia.se) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % % CVS: $Id: getDM.m,v 1.2 1999/03/31 13:16:01 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 % %% =========================================================================== 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,:),size(modems(m,:),2)), dm=[dm i]; end; end; end;