ConcatRows
ConcatRows( A ; rowIndex,colIndex, ,concatIndex )
Takes an array, A indexed by rowIndex and colIndex, and concatenates each row, henceforth flattening the array by one dimension. The result is indexed by concatIndex, which must be an index with Size(rowIndex) * Size(colIndex) elements.
As of Analytica 4.2, concatIndex is optional. If not specified, ConcatRows creates a local index with the name .ConcatIndex to dimension the result.
Library
In Analytica 4.2 and later, this function is a built-in function, in the Array library.
In Analytica 4.0 and 4.1, this function is located in the "Concatenation.ana" library. To use that function, you must add the library to your model.
Examples
Let
A:= |
|
---|
ConcatRows(A,I,J) | → |
|
ConcatRows(A,J,I) | → |
|
To flatten three dimensions, I1, I2 and I3, use:
- Var tmp := ConcatRows(A,I1,I2) Do ConcatRows(tmp,tmp.ConcatIndex,I3)
See Also
Comments
Enable comment auto-refresher