symmap_binary

Conversion from binary sequence \(\to\) symbol index sequence.

Namespace: dsp::telecom

Prototype

Veci symmap_binary(const BitStream &x, int k)

Parameters

xInput bit stream (zeros and ones).
kNumber 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: \[ y_i = \sum_{j=0}^{k-1} x_{ki+j} 2^j,\quad i = 0,\dots,(n+k-1)/k \]

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.

See also

symunmap_binary()