function [res] = ABCDshunt(f,R,C,L) %ABCDshunt - Generate a ABCD matrix corresponding to a shunt impedance % % Parameter: f Frequencies to use % R The shunt R % C The shunt C % L The shunt L % Returns: res The resulting ABCD matrix % % Example(s): % % Reference: % %% =========================================================================== %% =========================================================================== % Copyright (C): % 2001-2009 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: ABCDshunt.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== % 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=inf; else jwL=j*2*pi*f*L; end; if (nargin<3) || (C==0), jwC=0; else jwC=j*2*pi*f*C; end; if R==0; R=inf; end; R=R*ones(nf); OoZ= 1./R + jwC + 1./jwL; res={{ones(nf), zeros(nf)},... {OoZ, ones(nf)}};