The following usage examples show a few common programming situations where both array concatenation and array slices are involved, and how to do this correctly in order to avoid certain mistakes.
The first equations set XA1, XA2, XA3 and XA4 equal to row matrices and XB1, XB2 equal to column matrices respectively, created by appending an additional element to row/column matrices PA and PB.
Take a look at the value at time=0:
The following example shows three very similar ways of constructing a blocked matrix from submatrices. The first two variants follow the rule of always making sure that returned array slices as arguments to the special purpose concatenation operators are matrices. The third variant breaks this rule, since two of the array slices return vectors, causing an error.
Cyclic permutation can be achieved by a combination of concatenation operations and array slices or just array slices using a permutation vector.