function f=getMinFreqaxis(maxf); %% =========================================================================== %getMinFreqaxis - Finds minimal set for frequency axis % % Parameter: maxf The max frequency to get % Returns: f The minimum set of frequencies needed % % Example(s): % % Algorithmic details: % % Reference: %% =========================================================================== %% =========================================================================== % Copyright (C): % 1998-1999 by Telia Research AB, Lulea, Sweden; % 2000-2002 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FTW's xDSLsimu % Author(s) : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se) % : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % % CVS: $Id: getMinFreqaxis.m,v 1.17 2002/07/31 10:15:18 tono Exp $ %% =========================================================================== % Change History % 1998-12-17 (Dab) Created % 1998-12-21 (ToNo) Added comments % 1999-01-07 (Dab) +/- 1e3 on every frequency point % 1999-02-26 (ToNo) Added frequency points for cable model breakpoints % 1999-08-12 (DaB) Added 4.3 resolution over ADSL band if ADSL is evaluated % 1999-08-19 (DaB) Updated for new tfplan structure % 1999-09-30 (DaB) Rewritten for new ex struct % 2000-03-03 (GS) Added support for SDSL % 2000-09-22 (ToNo) Removed the 100Hz step stuff for SDSL % 2002-07-30 (ToNo) Optimized away the use of the slow "union" function % 2002-07-30 (ToNo) Replace str2num with eval directly %% =========================================================================== global ex; if nargin<1, maxf=ex.param.frequency.max; end n=length(ex.tfplist); allfs=[ex.param.frequency.min maxf]; for i=1:n, tmpstr=ex.tfplist(i).PSD.downstream; if strcmp(tmpstr(1:7),'calcPSD') start=findstr(tmpstr,'['); stop=findstr(tmpstr,']'); % tmp=str2num(tmpstr((start+1):(stop-1))); eval(['tmp=' tmpstr((start):(stop)) ';']); tmp=tmp(1:2:length(tmp)); allfs=[allfs tmp tmp+1e3 tmp-1e3]; end; tmpstr=ex.tfplist(i).PSD.upstream; if strcmp(tmpstr(1:7),'calcPSD') start=findstr(tmpstr,'['); stop=findstr(tmpstr,']'); % tmp=str2num(tmpstr((start+1):(stop-1))); eval(['tmp=' tmpstr((start):(stop)) ';']); tmp=tmp(1:2:length(tmp)); allfs=[allfs tmp tmp+1e3 tmp-1e3]; end; end; % Patch to fix ISDN PRA freq axis allfs=[allfs [150e3:150e3:maxf]]; % Patch to add cable model breakpoints allfs=[allfs min(5e6,maxf) ]; % removed 0.5e6 as it comes later % Patch to add ILoss test freq TestFreq=0.5e6:0.5e6:maxf; allfs=[allfs TestFreq]; % patch to add ADSL breakpoints allfs=[allfs 25.875e3 138e3 1.104e6]; %if ex.param.testADSL, allfs=[allfs [(4.3125:4.3125:1104)*1e3]]; %end; % add all possible PSD intersection points between the main PSD % and the floor PSD for symmetric/asymmetric SDSL % (calculations based on Draft RE/TM_06011-2,Montreux 2000) allfs=[allfs 1e3.*[41.91 82.06 122.44 162.97 203.59 244.29 285.05 325.86... 366.72 407.61 448.55 489.52 530.51 571.53 612.57 645.72... 656.36 697.59 722.73 738.83 1194.48 1283.62]]; allfs=[allfs [115 150 200 250 275 300]*1e3]; % The test frequencies for IL % Extra for SDSL noise test allfs=[allfs [1 10:10:100 150:50:400 600 800]*1e3]; tmp = unique(allfs); ind=find((tmp>0)&(tmp<=maxf)); f=tmp(ind);