concat2D(a,b)

Joins together 2D arrays.

NOTE - this function is maintained for backward-compatibility but is now deprecated in favor of arrayConcat(a,b)


Syntax

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

Usage

Use this to join multiple 2D arrays into a new 2D array.

Location

menu: veeos ==> Math ==> concat2D

library: mathLib

Example

             1  2  3   3  4           1  2  3  3  4  
o_concat2D ( 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
o_concat2D ( 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 2D arrays, it always flattens them into a 1D array. This function maintains the 2D shape and automatically determines the correct orientation. If number of rows match then columns are joined, and if number of columns match then rows are joined. If neither match then an error is raised. Note that loops are not used so this function is fast.

Reference

Dependencies

Supported On

VEE 7.0+, all platforms

See Also

concat3D, arrayConcat


© 2015. All Rights Reserved.  Stan Bischof (stan@worldbadminton.com). Last updated 04 November 2015 11:30. © 2015.