Difference between revisions of "Unflatten"
Line 2: | Line 2: | ||
''new to [[Analytica 4.7]]'' | ''new to [[Analytica 4.7]]'' | ||
− | == Unflatten( x'', I'', resultIndexes... | + | == Unflatten(x'', I'', resultIndexes...) == |
Transforms a one-dimensional vector «x» into a multidimensional array. | Transforms a one-dimensional vector «x» into a multidimensional array. | ||
− | + | «I» is an index of «x», which does not appear in the final result, and will usually be much longer than any of «resultIndexes», which are the dimensions of the final result. The cells in the multi-dimensional array are populated with the values of «x» along «I» in the order obtained by varying the first indexes listed in «resultIndexes» most slowly. | |
Index «I» can be omitted when your are unflattening along an implicit index, or along the local index created by a previous call to [[Flatten]] or [[ConcatRows]]. | Index «I» can be omitted when your are unflattening along an implicit index, or along the local index created by a previous call to [[Flatten]] or [[ConcatRows]]. | ||
− | When | + | When «I» has fewer elements than cells in the final array, the remaining cells are [[Null]]-padded. When there are more elements than result cells, only the first however-many values are used. |
== Examples == | == Examples == | ||
− | :<code>Unflatten( 1..12, resultIndexes:In1, In2 ) → </code> | + | :<code>Unflatten(1..12, resultIndexes: In1, In2) → </code> |
− | + | ||
+ | :[[image:Unflatten ex1.png]] | ||
+ | |||
+ | ==History== | ||
+ | Introduced in [[Analytica 4.7]]. | ||
== See Also == | == See Also == | ||
− | |||
* [[Flatten]] | * [[Flatten]] | ||
− | * [[MdTable]] | + | * [[MdTable]] |
+ | * [[ConcatRows]] | ||
+ | * [[Local Indexes]] |
Revision as of 18:45, 23 March 2016
new to Analytica 4.7
Unflatten(x, I, resultIndexes...)
Transforms a one-dimensional vector «x» into a multidimensional array.
«I» is an index of «x», which does not appear in the final result, and will usually be much longer than any of «resultIndexes», which are the dimensions of the final result. The cells in the multi-dimensional array are populated with the values of «x» along «I» in the order obtained by varying the first indexes listed in «resultIndexes» most slowly.
Index «I» can be omitted when your are unflattening along an implicit index, or along the local index created by a previous call to Flatten or ConcatRows.
When «I» has fewer elements than cells in the final array, the remaining cells are Null-padded. When there are more elements than result cells, only the first however-many values are used.
Examples
Unflatten(1..12, resultIndexes: In1, In2) →
History
Introduced in Analytica 4.7.
Enable comment auto-refresher