arrayConcat(a,b)

Joins together arrays.


Syntax

arrayConcat(a,b)
a: array any - first input array
b: array any - second input array
return: array any - the two input arrays concatenated together

Usage

Use this to join multiple arrays into a new array of same shape.

Location

menu: veeos ==> Math ==> Arrays ==> arrayConcat

library: mathLib

Example

             1  2  3   3  4           1  2  3  3  4  
arrayConcat( 4  5  6 , 3  4 ) yields  4  5  6  3  4
             7  8  9   3  4           7  8  9  3  4


             1  2   3  4           1  2
arrayConcat( 4  5 , 3  4 ) yields  4  5
             7  8                  7  8
                                   3  4
                                   3  4

Notes

While the built-in "concat()" function can join together arrays, it always flattens them into a 1D array. This function constructs a new array of same shape with the two input arrays joined side-by-side. Orientation is automatic (dimension that doesn't match gets extended. If all dimensions match then highest dim gets extended). Note that loops are not used so this function is fast.

Reference

Dependencies

Supported On

VEE 7.0+, all platforms

See Also

arrayRev


© 2015. All Rights Reserved.  Stan Bischof (stan@worldbadminton.com). Last updated 29 October 2015 09:40. © 2015.