# Home Networking Basis

### Walter Chen (view profile)

11 Aug 2003 (Updated )

M-files for chapters 2-10 and Simulink models for Ethernet and Wireless Ethernet.

[a,b,c,d]=blockabcd(r1,r2,r3,r4,r5,r6,l,c,f);
```function [a,b,c,d]=blockabcd(r1,r2,r3,r4,r5,r6,l,c,f);
dm=length(f);
j=sqrt(-1);
jw=j*2*pi*f;
a1=ones(1,dm);
b1=r1*ones(1,dm);
c1=zeros(1,dm);
d1=ones(1,dm);
a2=ones(1,dm);
b2=r2+l*jw;
c2=zeros(1,dm);
d2=ones(1,dm);
a3=ones(1,dm);
b3=r3*ones(1,dm);
c3=zeros(1,dm);
d3=ones(1,dm);
a4=ones(1,dm);
b4=r4*ones(1,dm);
c4=zeros(1,dm);
d4=ones(1,dm);
a5=ones(1,dm);
b5=zeros(1,dm);
c5=ones(1,dm)./(r5+r6./(r6*c*jw+ones(1,dm)));
d5=ones(1,dm);
a12=(a1.*b2+b1.*a2)./(b1+b2);
b12=(b1.*b2)./(b1+b2);
c12=((b1+b2).*(c1+c2)-(a1-a2).*(d1-d2))./(b1+b2);
d12=(b1.*d2+d1.*b2)./(b1+b2);
a35=a3.*a5+b3.*c5;
b35=a3.*b5+b3.*d5;
c35=c3.*a5+d3.*c5;
d35=c3.*b5+d3.*d5;
a345=a35.*a4+b35.*c4;
b345=a35.*b4+b35.*d4;
c345=c35.*a4+d35.*c4;
d345=c35.*b4+d35.*d4;
a=(a12.*b345+b12.*a345)./(b12+b345);
b=(b12.*b345)./(b12+b345);
c=((b12+b345).*(c12+c345)-(a12-a345).*(d12-d345))./(b12+b345);
d=(b12.*d345+d12.*b345)./(b12+b345);

```