DSP Blockset    

Importing a Sample-Based Matrix Signal

The Signal From Workspace block generates a sample-based matrix signal when the variable (or expression) in the Signal parameter is a three-dimensional array and Samples per frame = 1. Beginning with the first page of the array, the block releases a single page (i.e., matrix) of the array to the output at each sample time. Therefore, if the Signal parameter specifies an M-by-N-by-P array, the output of the Signal From Workspace block is an M-by-N matrix, representing M*N channels.

The figure below illustrates this for a 6-by-4-by-5 workspace array A.

As the figure above suggests, the output of the Signal From Workspace block can only be a valid sample-based signal (having M*N independent channels) if the M-by-N-by-P workspace array A in fact represents M*N independent channels, each having P samples. In other words, the workspace array must be oriented to have time running along its third (P) dimension.

When the block has output all of the pages available in the specified array, it can start again at the beginning of the array, or simply repeat the final page (or generate zero-matrices) 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 matrix signal into a model.


  Example: Importing a Sample-Based Vector Signal Example: Importing a Sample-Based Matrix Signal