Returns the first two dimensions of an array as matrix

matrix(A)

Returns **promote**(A,2), if A is a scalar or
vector and otherwise returns the elements of the first two
dimensions as a matrix. **size**(A,i) = 1 is required
for 2 < i ≤ **ndims**(A).

Function **promote**(A,n) fills dimensions of size
1 from the right to array A up to dimension n, where "n >
**ndims**(A)" is required. Let C =
**promote**(A,n), with nA = **ndims**(A),
then

ndims(C) = n,size(C,j) =size(A,j) for 1 ≤ j ≤ nA,size(C,j) = 1 for nA+1 ≤ j ≤ n, C[i_1, ..., i_nA, 1, ..., 1] = A[i_1, ..., i_nA].

Generated at 2020-07-12T01:53:50Z by OpenModelicaOpenModelica 1.16.0~dev-548-gd3091d6 using GenerateDoc.mos