No BSD License  

Highlights from
Home Networking Basis

Home Networking Basis

by

 

11 Aug 2003 (Updated )

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

fwt.m
% Fast Walsh Transform
% FWT size
n=8; 
% Create a test data vector
H1=1;
H2=[H1 H1; H1 -H1];
H4=[H2 H2; H2 -H2];
H8=[H4 H4; H4 -H4];
x=H8(5,:);
% Carry out log2(n) stages of 
% n/2 additions and subtractions
for i=1:log2(n)
    blk=2^(3-i);
    dis=2^(i-1);
    for j=0:2*dis:2*dis*(blk-1)   
        for k=1:dis
            y(j+k)=x(j+k)+x(j+k+dis);
            y(j+k+dis)=x(j+k)-x(j+k+dis);
        end
    end
    x=y;
end

Contact us