function theMargin = marginEval(xlen) %% =========================================================================== % Copyright (C): % 2005-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Description : ETSI SpM performance simulations % % Project : BANG, FTW % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % Usage: % % Compact scenario description, suitable for TTsetup % ntt = {{'ETSI-SDSL-sym-1024',20,-1}{'ETSI-ADSL-FDDoverPOTS',20,-1}}; % ex.param.modemlist=str2mat(ntt{1}{1}); % Considered modem % % % Set up parameters for marginEval % ex.ms.ntt = ntt; % Scenario to consider % ex.ms.resrow = 1; % Row for result should match modemlist % ex.ms.cable = 'ETSI-SDSL-PE04'; % Cable to use % % % Do the search % [reach,fval,exitflag,output]=fzero(@marginEval,[250,8000]); % % CVS: $Id: marginEval.m,v 1.2 2005/01/04 10:25:12 tono Exp $ %% =========================================================================== %% =========================================================================== % Change History % 2005-04-25 (ToNo) Created as a separate evaluator function % useful for search with fzero (cf. ExSDSLreach_v2.m) %% =========================================================================== global ex; ex.tt=TTsetup(ex.ms.ntt,xlen,ex.ms.cable); result = evalExperiment; [bitrate_LT, bitrate_NT, margin_LT, margin_NT] = calcXDSLresult(ex,result); theMargin = min(margin_LT(ex.ms.resrow),margin_NT(ex.ms.resrow));