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.

fwtcc.m
% Fast Walsh Transform for quadrature phase 
% complementary code words
jj=sqrt(-1);
% Use a random code word as a test vector
cc64
x=cc(6,:);
% First stage of operation
% Resverse signs of bits 4 and 7
x(4)=-x(4);
x(7)=-x(7);
for i=1:2:8
    x2((i-1)*2+1)=x(i)+x(i+1);
    x2((i-1)*2+2)=x(i)+jj*x(i+1);
    x2((i-1)*2+3)=x(i)-x(i+1);
    x2((i-1)*2+4)=x(i)-jj*x(i+1);
end
% Secodn stage of operation
for i=1:4:8
    j=(i-1)*2;
    k=(i-1)*4;
    x3(k+1:k+4)=x2(j+1:j+4)+x2(j+5:j+8);
    x3(k+5:k+8)=x2(j+1:j+4)+jj*x2(j+5:j+8);
    x3(k+9:k+12)=x2(j+1:j+4)-x2(j+5:j+8);
    x3(k+13:k+16)=x2(j+1:j+4)-jj*x2(j+5:j+8);
end
% Third stage of operation
for i=1:8:8
    x4(1:16)=x3(1:16)+x3(17:32);
    x4(17:32)=x3(1:16)+jj*x3(17:32);
    x4(33:48)=x3(1:16)-x3(17:32);
    x4(49:64)=x3(1:16)-jj*x3(17:32);
end

Contact us