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). When you set FrameBasedProcessing to true, the number of samples per channel equals the number of rows in the input. If you set FrameBasedProcessing to false, the number of samples per channel equals 1.
To buffer an input signal:
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.
PropertyValue,...) 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.
Specify the value of the object's initial output for cases of nonzero latency as a scalar, vector, or matrix. The default is 0.
Enable frame-based processing
If this property is set to true, each column of the input is treated as a separate channel for buffering. If the value of this property is false, each element of the input is treated as a separate channel. The default is true.
|clone||Create instance of an object with the same property values|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs of step method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset the internal states of a System object|
|step||Buffer input signal based on past values|
Create a buffer of 256 samples with 128 sample overlap:
hreader=dsp.SignalSource(randn(1024,1),128); hbuff=dsp.Buffer(256,128); for i=1:8 y=step(hbuff,step(hreader)); % y is of length 256 with 128 samples % from previous input end
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.
This object processes inputs as frames or as samples by setting the FrameBasedProcessing property. The corresponding block has a temporary Treat Mx1 and unoriented sample-based signals as parameter with One channel option for frame behavior and M channels option for sample behavior. See the Buffer block reference page and Set the FrameBasedProcessing Property of a System object for more information.