Unbuffer input frame into sequence of scalar outputs
The Unbuffer block unbuffers an Mi-by-N input into a 1-by-N output. That is, inputs are unbuffered row-wise so that each matrix row becomes an independent time-sample in the output. The rate at which the block receives inputs is generally less than the rate at which the block produces outputs.
The block adjusts the output rate so that the sample period is the same at both the input and output, Tso=Tsi. Therefore, the output sample period for an input of frame size Mi and frame period Tfi is Tfi/Mi, which represents a rate Mi times higher than the input frame rate. In the example above, the block receives inputs only once every three sample periods, but produces an output once every sample period. To rebuffer inputs to a larger or smaller frame size, use the Buffer block.
In the modelmodel below, the block unbuffers a four-channel input with a frame size of three. The Initial conditions parameter is set to zero and the tasking mode is set to multitasking, so the first three outputs are zero vectors.
The Unbuffer block has zero-tasking latency in Simulink® single-tasking mode. Zero-tasking latency means that the first input sample (received at t=0) appears as the first output sample.
For multitasking operation, the Unbuffer block's buffer is initialized with the value specified by the Initial conditions parameter, and the block begins unbuffering this frame at the start of the simulation. Inputs to the block are therefore delayed by one buffer length, or Mi samples.
The Initial conditions parameter can be one of the following:
A scalar to be repeated for the first Mi output samples of every channel
A length-Mi vector containing the values of the first Mi output samples for every channel
An Mi-by-N matrix containing the values of the first Mi output samples in each of N channels
The value of the block's initial output for cases of nonzero latency. You can specify a scalar, vector, or matrix.
Specify how the block processes sample-based inputs. You can select one of the following options:
Same as frame based — When you select this option, the block performs frame-based processing on sample-based inputs. The block unbuffers Mi-by-N matrix inputs into a 1-by-N output. Each row of the input matrix becomes an independent time-sample in the output.
Pass through (this choice will be removed — see release notes) — When you select this option and the input to the block is sample based, the block does not unbuffer the input. The output of the block is the same as the input.
|Port||Supported Data Types|
|Buffer||DSP System Toolbox|
See Unbuffer Frame-Based Signals into Sample-Based Signals for related information.