In a multi-user environment (like spread spectrum, CDMA ) large number of codes with good correlation properties, is a necessity. Gold codes are suited for this application, since a large…

# Tag: Cross-Correlation

Auto-correlation, also called series correlation, is the correlation of a given sequence with itself as a function of time lag. Cross-correlation is a more generic term, which gives the correlation…

The following is a function to generate a Walsh Hadamard Matrix of given codeword size. The codeword size has to be a power of 2.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
function [H]=generateHadamardMatrix(codeSize) %[H]=generateHadamardMatrix(codeSize); % Function to generate Walsh-Hadamard Matrix where "codeSize" is the code % length of walsh code. The first matrix gives us two codes; 00, 01. The second % matrix gives: 0000, 0101, 0011, 0110 and so on % Author: Mathuranathan for http://www.gaussianwaves.com % License: Creative Commons: Attribution-NonCommercial-ShareAlike 3.0 % Unported %codeSize=64; %For testing only N=2; H=[0 0 ; 0 1]; if bitand(codeSize,codeSize-1)==0 while(N~=codeSize) N=N*2; H=repmat(H,[2,2]); [m,n]=size(H); %Invert the matrix located at the bottom right hand corner for i=m/2+1:m, for j=n/2+1:n, H(i,j)=~H(i,j); end end end else disp('INVALID CODE SIZE:The code size must be a power of 2'); end |

Example: To Generate Walsh…

In the previous article, generation of preferred pairs of m-sequences [1] for gold codes was discussed.Lets see how to generate Gold sequences using the preferred pair of m-sequences (say \(d_1\)…

Preferred Pair m-Sequences for Gold Codes: Spreading sequences in a spread spectrum systems can be generated with help of diversified codes like m-sequences,Gold Codes,Kasami Codes, Walsh Codes etc. Compared to…

Leave a Comment