symmap_binary
Conversion from binary sequence \(\to\) symbol index sequence.
Namespace: dsp::telecom
Prototype
Veci symmap_binary(const BitStream &x, int k)
Parameters
x | Input bit stream (zeros and ones). |
k | Number of bits / symbol. |
Returns
Vector with \((n+k-1)/k\) samples.
Description
This function convert a binary vector (0 and 1), to symbols indexes, using \(k\) bits / symbol, according to the following binary encoding:
- Note
- If the number of samples \(n\) of the input vector is not a multiple of \(k\), zeros are inserted at the end to complete the last symbol.