.ModelicaReference.Operators.'cat()'

Information

The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k.

Examples

Real[2,3] r1 = cat(1, {{1.0, 2.0, 3}}, {{4, 5, 6}});
Real[2,6] r2 = cat(2, r1, 2*r1);

Description

The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k according to the following rules:

Concatenation is formally defined according to:

Let R = cat(k,A,B,C,...), and let n = ndims(A) = ndims(B) = ndims(C) = ...., then
size(R,k) = size(A,k) + size(B,k) + size(C,k) + ...
size(R,j) = size(A,j) = size(B,j) = size(C,j) = ...., for 1 <= j <= n and j <> k.
R[i_1, ..., i_k, ..., i_n] = A[i_1, ..., i_k, ..., i_n], for i_k <= size(A,k),
R[i_1, ..., i_k, ..., i_n] = B[i_1, ..., i_k - size(A,i), ..., i_n], for i_k <= size(A,k) + size(B,k),
....
where 1 <= i_j <= size(R,j) for 1 <= j <= n.

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39