Contenu principal

stack

Construct array by stacking uncertain matrices, models, or arrays

Syntax

umatout = stack(arraydim,umat1,umat2,...)
usysout = stack(arraydim,usys1,usys2,...)

Description

stack constructs an uncertain array by stacking uncertain matrices, models, or arrays along array dimensions of an uncertain array.

umatout = stack(arraydim,umat1,umat2,...) produces an array of uncertain matrices, umatout, by stacking (concatenating) the umat matrices (or umat arrays) umat1, umat2,... along the array dimension arraydim. All models must have the same number of columns and rows. The column/row dimensions are not counted in the array dimensions.

umatout = stack(arraydim,usys1,usys2,...) produces an array of uncertain models, ufrd or uss, or usysout, by stacking (concatenating) the ufrd or uss matrices (or ufrd or uss arrays) usys1, usys2,... along the array dimension arraydim. All models must have the same number of columns and rows (the same input/output dimensions). Note that the input/output dimensions are not considered for arrays.

Examples

Consider usys1 and usys2, two single-input/single-output uss models:

zeta = ureal('zeta',1,'Range',[0.4 4]); 
wn = ureal('wn',0.5,'Range',[0.3 0.7]); 
P1 = tf(1,[1 2*zeta*wn wn^2]); 
P2 = tf(zeta,[1 10]); 

You can stack along the first dimension to produce a 2-by-1 uss array.

stack(1,P1,P1) 
USS: 2 States, 1 Output, 1 Input, Continuous System [array, 2 x 1] 
    wn: real, nominal = 0.5, range = [0.3  0.7], 3 occurrences 
  zeta: real, nominal = 1, range = [0.4  4], 1 occurrence     

You can stack along the second dimension to produce a 1-by-2 uss array.

stack(2,P1,P2)   % produces a 1-by-2 USS array. 
USS: 2 States, 1 Output, 1 Input, Continuous System [array, 1 x 2] 
    wn: real, nominal = 0.5, range = [0.3  0.7], 3 occurrences 
  zeta: real, nominal = 1, range = [0.4  4], 1 occurrence     

You can stack along the third dimension to produce a 1-by-1-by-2 uss array.

stack(3,P1,P2)   % produces a 1-by-1-by-2 USS array. 
USS: 2 States, 1 Output, 1 Input, Continuous System
[array, 1 x 1 x 2] 
    wn: real, nominal = 0.5, range = [0.3  0.7], 3 occurrences 
  zeta: real, nominal = 1, range = [0.4  4], 1 occurrence     

Version History

Introduced before R2006a