'array()'array() |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
The constructor function array(A,B,C,...)
constructs an array from its arguments.
{1,2,3} is a 3-vector of type Integer {{11,12,13}, {21,22,23}} is a 2x3 matrix of type Integer {{{1.0, 2.0, 3.0}}} is a 1x1x3 array of type Real Real[3] v = array(1, 2, 3.0); type Angle = Real(unit="rad"); parameter Angle alpha = 2.0; // type of alpha is Real. // array(alpha, 2, 3.0) or {alpha, 2, 3.0} is a 3-vector of type Real. Angle[3] a = {1.0, alpha, 4}; // type of a is Real[3].
array(A,B,C,...)
constructs an array from its arguments according to the following
rules:
size(A)=size(B)=size(C)=...
ndims(array(A,B,C)) = ndims(A) + 1 = ndims(B) + 1, ...
{A, B, C, ...}
is a shorthand notation for array(A, B, C, ...)
.array()
or {}
are not defined].