function theMargin = marginEval(xlen) %% =========================================================================== % Copyright (C): % 2002-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: % fzero(@marginEval,3000) % % [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 % 2002-06-14 (ToNo) Created as a seperate search function % 2003-11-27 (ToNo) Restarted and debugged this routine %% =========================================================================== 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));