Function Reference | ![]() ![]() |
Build an LTI array by stacking LTI models or LTI arrays along array dimensions of an LTI array
Syntax
Description
sys = stack(arraydim,sys1,sys2,...) produces an array of LTI models sys
by stacking (concatenating) the LTI models (or LTI arrays) sys1
,sys2
,...
along the array dimension arraydim
. All models must have the same number of inputs and outputs (the same I/O dimensions), but the number of states can vary. The I/O dimensions are not counted in the array dimensions. See "Dimensions, Size, and Shape of an LTI Array and Building LTI Arrays Using the stack Function for more information.
For arrays of state-space models with variable order, you cannot use the dot operator (e.g., sys.a
) to access arrays. Use the syntax
to extract the state-space matrices of each model as separate cells in the cell arrays a
, b
, c
, and d
.
Example
If sys1
and sys2
are two LTI models:
stack(1,sys1,sys2)
produces a 2-by-1 LTI array.
stack(2,sys1,sys2)
produces a 1-by-2 LTI array.
stack(3,sys1,sys2)
produces a 1-by-1-by-2 LTI array.
![]() | ssdata | step | ![]() |