function [plan_up,plan_down]=setupPSDplan(plan,signal); %% =========================================================================== %setupPSDplan - Generate a PSD description from a simple list % % Parameter: plan PSD mask description % Parameter: signal Signal level when sending % Returns: plan_up PSD plan for upstream % Returns: plan_down PSD plan for downstream % % Example(s): % [tmp_tfplan.upstream,tmp_tfplan.downstream]=... % setupPSDplan({.3e6 'u' 1.1e6 'd' 2.2e6 'u' 7.5e6},-60); % % Algorithmic details: % % Reference: % FSAN duplex simulation memo, Telia 1998 %% =========================================================================== %% =========================================================================== % 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) % % Revision : PA.2 % CVS: $Id: setupPSDplan.m,v 1.1 1999/03/25 10:17:40 tono Exp $ %% =========================================================================== % Change History % 1999-01-14 (ToNo) Created %% =========================================================================== global ex; nosignal=ex.param.backgroundNoise; if nargin<2, error('Not enough input arguments.'); end plen=length(plan); if plen<3, error('setupPSDplan must have length > 3'); end; if ischar(plan{1}) | ischar(plan{plen}), error('Start and stop setupPSDplan with a frequency.'); end; plan_up=[]; plan_down=[]; for i=1:2:plen-2, start=plan{i}; direction=plan{i+1}; stop=plan{i+2}; if ischar(start) | ischar(stop), error('Frequencies should be around a direction.'); end; if stop