User`s guide

Constructing Signals
3-49
“Example: Buffering Frame-Based Signals with Overlap” on page 3-52
“Buffering Delay and Initial Conditions” on page 3-53
Example: Buffering Sample-Based Signals without Overlap. In the model below, a
two-channel sample-based signal is buffered into a two-channel frame-based
signal.
To build the model, make the following parameter settings:
In Signal From Workspace:
-
Signal = [1:10;-1:-1:-10]'
- Sample time = 1
- Samples per frame = 1
In Buffer
-
Output buffer size = 4
-
Buffer overlap = 0
- Initial conditions = 0
The Signal From Workspace block generates one two-channel sample at each
sample time due to the
Samples per frame parameter setting of 1. The Buffer
size
setting of 4 in the Buffer block results in a frame-based output with frame
size 4.
A much better way to create the frame-based signal shown above is to set the
Samples per frame parameter of the Signal From Workspace block to 4. The
Signal From Workspace block then performs the buffering internally, and
directly generates the two-channel frame-based signal; the separate Buffer
block is not needed. See the following sections for more information:
“Creating Signals Using the Signal From Workspace Block” on page 3-38
Four consecutive samples from a
2-channel sample-based signal
2-channel frame-based signal
11
22
33
44
[1 -1]
[2 -2]
[3 -3]
[4 -4]
t=0t=1t=2t=3