Functions Index :: A :: ArrayPlex

[<< up one level]

Module:

array :: slices

Definition:

ArrayPlex(string arr01, string arr02, string "arr03", string "arr04", ... , string "arr20")

Description:

Multiplexes the arrays passed as arguments (arr01, arr02, ...) and returns the resulting array. [1]

Multiplexing is performed by taking sequentially one element of each array and appending it to the resulting array. In effect the function creates a matrix with each array being a column of the matrix, in the order that they are passed to the function.

Examples:

ax = ArrayRange(0, 500, 50)

# y coordinates

ay = "0,100,160,210,240,250,260,250,240,220,190"

# (x,y) coordinates

coords = ArrayPlex(ax, ay)

# coords == "0,0,50,100,100,160,150,210,..."

# or in a more visually evident arrangement

# "0,0,\

# 50,100,\

# 100,160,\11`

# ..."

 

[<< top]

 


[1]: The function can handle up to 20 arguments. This number is chosen as a good balance between usability and speed. If more arguments are needed use an array and the ArraySum function, or a suitable function of the array package.