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.  
  
«<code>I</code>» 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 «<code>I</code>» in the order obtained by varying the first indexes listed in «resultIndexes» most slowly.
+
«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 «<code>I</code>» 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.
+
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 ) &rarr; </code>
+
:<code>Unflatten(1..12, resultIndexes: In1, In2) &rarr; </code>
:::[[image:Unflatten ex1.png]]
+
 
 +
:[[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) →
Unflatten ex1.png

History

Introduced in Analytica 4.7.

See Also

Comments


You are not allowed to post comments.