function [res] = ABCDseries(f,R,C,L); %ABCDseries - Generate a ABCD matrix corresponding to a serie impedance % % Parameter: f Frequencies to use % R The serie R % C The serie C % L The serie L % Returns: res The resulting ABCD matrix % % Example(s): % % Reference: % %% =========================================================================== %% =========================================================================== % Copyright (C): % 2001-2003 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Petr Kadlec (kadlec@ftw.at) % % CVS: $Id: ABCDseries.m,v 3.2 2003/11/03 12:33:22 tono Exp $ %% =========================================================================== % Change History % 2001-11-10 (ToNo) Created % 2002-07-22 (Peka) Octave port % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab %% =========================================================================== nf = size(f); if nargin<4, jwL=0; else jwL=j*2*pi*f*L; end; if (nargin<3) | (C==0), jwC=inf; else jwC=j*2*pi*f*C; end; R=R*ones(nf); Z= R + 1./jwC + jwL; res={{ ones(nf), Z},... {zeros(nf), ones(nf)}};