dsp.Buffer System object

Package: dsp

Buffer input signal


The Buffer object buffers an input signal. The number of samples per channel in the input must equal the difference between the output buffer size and buffer overlap (i.e., Length - OverlapLength).

To buffer an input signal:

  1. Define and set up your buffer System object™. See Construction.

  2. Call step to buffer the input according to the properties of dsp.Buffer. The behavior of step is specific to each object in the toolbox.


H=dsp.Buffer returns a buffer System object, HBUFF, used to buffer input signals with overlap.

H=dsp.Buffer('PropertyName',PropertyValue,...) returns a buffer object, H, with each specified property set to the specified value.

returns a buffer object, H, with Length property set to LEN, OverlapLength property set to OVRLAP, InitialConditions property set to ICS and other specified properties set to the specified values.



Number of samples to buffer

Specify the number of consecutive samples from each input channel to buffer. You can set this property to any scalar integer greater than 0 of MATLAB® built-in numeric data type. The default is 64.


Amount of overlap between outputs

Specify the number of samples by which consecutive output frames overlap. You can set this property to any scalar integer greater than or equal to 0 of MATLAB built-in numeric data type. The default is 0.


Initial output

Specify the value of the object's initial output for cases of nonzero latency as a scalar, vector, or matrix. The default is 0.


cloneCreate instance of an object with the same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs of step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset the internal states of a System object
stepBuffer input signal based on past values


Create a buffer of 256 samples with 128 sample overlap:


for i=1:8
     % y is of length 256 with 128 samples
     %   from previous input


This object implements the algorithm, inputs, and outputs described on the Buffer block reference page. The object properties correspond to the block properties, except as noted.

Was this topic helpful?