Flatten

Revision as of 02:10, 18 March 2016 by Lchrisman (talk | contribs) (Created page with "category:Transformation functions ''new to Analytica 4.7'' == Flatten( x'', I..., resultIndex'' ) == Flattens the cells of a multi-dimensional array into a one-dimen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

new to Analytica 4.7

Flatten( x, I..., resultIndex )

Flattens the cells of a multi-dimensional array into a one-dimensional vector.

You should usually specify the indexes of «x» that you want to flatten over. For example, Flatten(x, In1, In2, In3) returns a one-dimensional array having the same values as the 3-dimensional array «x». The indexes listed first vary the slowest.

If you already have a result index, K for the final result, specify it by name using

[[Flatten](x, In1, In2, In3, resultIndex: K )
If you omit «resultIndex», a local index is created for you with the name .K. If your «resultIndex» is shorter than the number of cells, the flattened result is truncated, or if it is too long the result is null-padded.

Because a local index is created for the result, to define an index from the result of Flatten, you should surround it in CopyIndex(...).

If you omit «I» (the indexes to flatten), then all indexes of «x» are used, but you don't have explicit control over what order is used.

Examples

TBD

See Also

Comments


You are not allowed to post comments.