User`s guide

Importing Signals
3-67
Channel 3: 0, 0, 0, 0, 0,...
Channel 4: 5, 5, 5,..., 0, 0, 0,...
To create the model, define the following variables at the MATLAB command
line.
sig1 = reshape(1:100,[1 1 100]) % 1-by-1-by-100 array
sig2 = reshape(-1:-1:-100,[1 1 100]) % 1-by-1-by-100 array
sig3 = zeros(1,1,100) % 1-by-1-by-100 array
sig4 = 5*ones(1,1,100) % 1-by-1-by-100 array
sig12 = cat(2,sig1,sig2) % 1-by-2-by-100 array
sig34 = cat(2,sig3,sig4) % 1-by-2-by-100 array
A = cat(1,sig12,sig34) % 2-by-2-by-100 array
Array A represents a 4-channel signal with 100 samples.
Specify the following parameter values in the Signal From Workspace block:
Signal = A
Sample time = 1
Samples per frame = 1
Form output after final data value = Setting to zero
The Sample time and Samples per frame settings of 1 yield a sample-based
output with sample period of 1 second. Each of the four elements in the matrix
represents an independent channel. The
Form output after final data value
parameter setting specifies that all outputs after the one-hundredth are zero.
The following two sections may also be of interest:
“Creating Signals Using the Signal From Workspace Block” on page 3-38
Four consecutive samples from a
4-channel sample-based signal
11
05
22
05
first matrix output
t=0t=1
33
05
t=2t=3
44
05