DSP Blockset    

Example: Importing a Sample-Based Vector Signal.   In the model below, the Signal From Workspace creates a three-channel sample-based signal with the following data:

To create the model, define the following variables at the MATLAB command line

Matrix A represents a two-channel signal with 100 samples, and matrix B represents a one-channel signal with 100 samples.

Specify the following parameter values in the Signal From Workspace block:

The Signal expression [A B] uses the standard MATLAB syntax for horizontally concatenating matrices and appends column vector B to the right of matrix A. Equivalently, you could set Signal = C, and define C at the command line by

The Sample time setting of 1 yields a sample-based output with sample period of 1 second. The Form output after final data value parameter setting specifies that all outputs after the third are zero.


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