function newtt=setTT(tt,xDSLlist) %setTT - replaces generic DSL with specific implementation as % defined in xDSLlist % % Parameter: tt Topology structure % Parameter: xDSLlist DSL mapping list % Returns: newtt Modified topology structure % % Example(s): % %% =========================================================================== %% =========================================================================== % Copyright (C): % 1999 by Telia Research AB, Lulea, Sweden; % 2000-2003 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % : Bo Engstrom (bosse@upzide.com) % % CVS: $Id: setTT.m,v 3.4 2003/11/03 12:33:22 tono Exp $ %% =========================================================================== % Change History % 1999-12-01 (DaB) Created % 2000-02-17 (GS) The second input argument ('X') in 'size(xDSLlist,X)' % was changed to the value of 2 because each of % the systems to be investigated should be % represented by their specific PSD's and not % only by their generic name definitions. % 2001-06-17 (Bosse) Octave port % 2002-07-01 (PeKa) Octave to Matlab compatibility port % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab %% =========================================================================== newtt=tt; len_a=length(xDSLlist); len_b=length(tt.traffic); for a=1:len_a y=xDSLlist{a}; test=y.name; for b=1:len_b name=tt.traffic{b}{3}; if strcmp(test,name) x=xDSLlist{a}; newtt.traffic{b}{3}=x.used; end end end