I'm asking about some details about using the Walsh matrix as spreading sequence code. For example, suppose I'm using a $$4\times 4$$ Walsh matrix given by

$$H = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{pmatrix}$$ and I have data $$x$$ which will be spread on that Walsh matrix.

My question: what is the length of $$x$$ supposed to be? Must it be less than 4? Or can it be more than 4 too? In other words, suppose I have a signal $$x = 10$$ , it's supposed that is easy to spread the signal $$x$$ on the first column of $$H$$. The question is, What's about if the signal $$x = 101101$$ , can we do the spread on the first column too? where the signal $$x$$ has length larger than the first column.

• This question is a bit surprising, because you already know what $H$ looks like – so, what is the mathematical operation that you do with $H$ and your data? – Marcus Müller Feb 14 at 13:13
• The mathematical operation is XOR, but that's the relationship of that with the question? I mean is that feasible in practical or not? – Gze Feb 14 at 15:28
• no, it's not; XOR isn't applicable to your bit and "-1"; I think your question might be a different, more basic one: "how do I use $H$ in my DSSS?" Would that be an accurate description of your question? – Marcus Müller Feb 14 at 17:00
• I think the question I posted above is OK too .. I'm asking is it possible to have signal length of data bigger than the spread code in hadamard matrix? as explained in the question. That's what I need to know, at least, for the moment. – Gze Feb 15 at 4:26
• sadly, your question makes little sense: If you knew how to use $H$, then you'd see it applies to a single data bit. – Marcus Müller Feb 15 at 8:09

Yes you can, because you do spreading for each bit of data. So, regardless the length of your data, you are going to spread every bit on your code. In case if you have $$x = 10$$ you will have data after spreading with length 8, and if $$x=101101$$ you will have data to send with length 4 x 6 = 24. Just try to understand the process of spreading (I think it's by XOR), then you do spread for each bit of data, not for all data.

Good luck

Walsh-Hadamard matrix is usually used for DS CDMA. In this case, $$\mathbf{x}$$ contains symbols from different users. Since your matrix $$\mathbf{H}$$ is $$4\times 4$$, then the vector $$\mathbf{x}$$ must be of length of $$4\times 1$$. This means that you can support $$4$$ users at any given time. So, the answer to your question is no, you cannot spread a signal of length more than $$4$$.

• He is talking about spreading itself, here the basic idea of spreading, youtube.com/watch?v=XJ81CuujwYE $x$ must not be same length of columns of $H$, plz re check. – Zeyad_Zeyad Feb 16 at 6:35
• Yes, the video is explaining that well, but I didn't understand what BlackMath means, could you please explain more. – Gze Feb 16 at 7:33
• The video is fine. However, note that we apply each code for one bit for each user. This means that, at any given time, a maximum of 4 users can transmit. Of course, you can repeat the process for a sequence of bits. It depends what the OP means by x. If it's a sequence from the same user, then one spreading code can be used for each bit, and the length of sequence is irrelevant. If it's a signal corresponding to multiple users, then a maximum of 4 bits can be transmitted at any given time. – BlackMath Feb 16 at 8:52
• @Gze I agree with above comment too, That's right, I think it's clear now. – Zeyad_Zeyad Feb 16 at 13:07