Difference between revisions of "Unflatten"
m |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
[[category:Transforming functions]] | [[category:Transforming functions]] | ||
− | ''new to [[Analytica | + | ''new to [[Analytica 5.0]]'' |
− | == Unflatten(x'', | + | == Unflatten(x'', i'', resultIndexes...) == |
− | Transforms a one-dimensional vector «x» into a multidimensional array. | + | Transforms a one-dimensional vector «x» indexed by «i» into a multidimensional array, indexed by 2 or more «resultIndexes». |
− | + | «i» is an index of «x», which does not appear in the final result. «resultIndexes» are the dimensions of the final result. The result contains the values of «x» over «i» in the order obtained by varying the first indexes in «resultIndexes» most slowly. Usually, the size of «i» is equal to the product of the sizes of the «resultIndexes». If «i» has fewer elements than that, it pads the remaining cells with [[Null]]. If «i» has more elements than needed for the result cells, it ignores the unneeded values along «i». | |
− | Index | + | You may omit Index «i» when unflattening over an [[implicit index]], or over the local index created by a previous call to [[Flatten]] or [[ConcatRows]]. |
− | |||
− | |||
== Examples == | == Examples == | ||
Line 19: | Line 17: | ||
==History== | ==History== | ||
− | Introduced in [[Analytica | + | Introduced in [[Analytica 5.0]]. |
== See Also == | == See Also == |
Latest revision as of 18:49, 19 June 2017
new to Analytica 5.0
Unflatten(x, i, resultIndexes...)
Transforms a one-dimensional vector «x» indexed by «i» into a multidimensional array, indexed by 2 or more «resultIndexes».
«i» is an index of «x», which does not appear in the final result. «resultIndexes» are the dimensions of the final result. The result contains the values of «x» over «i» in the order obtained by varying the first indexes in «resultIndexes» most slowly. Usually, the size of «i» is equal to the product of the sizes of the «resultIndexes». If «i» has fewer elements than that, it pads the remaining cells with Null. If «i» has more elements than needed for the result cells, it ignores the unneeded values along «i».
You may omit Index «i» when unflattening over an implicit index, or over the local index created by a previous call to Flatten or ConcatRows.
Examples
Unflatten(1..12, resultIndexes: In1, In2) →
History
Introduced in Analytica 5.0.
Enable comment auto-refresher