DSP Blockset | ![]() ![]() |
Importing a Sample-Based Vector Signal
The Signal From Workspace block generates a sample-based vector signal when the variable (or expression) in the Signal parameter is a matrix and Samples per frame = 1
. Beginning with the first row of the matrix, the block releases a single row of the matrix to the output at each sample time. Therefore, if the Signal parameter specifies an M-by-N matrix, the output of the Signal From Workspace block is a 1-by-N matrix (row vector), representing N channels.
The figure below illustrates this for a 6-by-4 workspace matrix, A
.
As the figure above suggests, the output of the Signal From Workspace block can only be a valid sample-based signal (having N independent channels) if the M-by-N workspace matrix A
in fact represents N independent channels, each containing M consecutive samples. In other words, the workspace matrix must be oriented so as to have the independent channels as its columns.
When the block has output all of the rows available in the specified variable, it can start again at the beginning of the signal, or simply repeat the final value (or generate zeros) until the end of the simulation. This behavior is controlled by the Form output after final data value by parameter. See the Signal From Workspace reference page for more information.
The following example illustrates how the Signal From Workspace block can be used to import a sample-based vector signal into a model.
![]() | Importing a Multichannel Sample-Based Signal | Example: Importing a Sample-Based Vector Signal | ![]() |