MATLAB: How to generate pn-sequence in matlab

cdmapn sequence

How can I generate PN-sequence that is then used for spreading the spectrum in CDMA?? I once read that it is implemented using shift registers but how can we write the matlab code?

Best Answer

You might not have to reinvent the wheel. If you have the Communications Toolbox, you could use seqgen. If not, you could try reading Maximum Length Sequences ( m-sequences).