JOIN function
Syntax: |
m = JOIN(x,y)
|
The arguments of the JOIN
function must both be
vectors. JOIN
produces a matrix with 3
columns. The first column is the intersection of x
and y
, that is, if you enter
m=JOIN(x,y)
then m[*,1]
is the same
as x/&y
, where /& is the
intersection operator.
m[i,2]
is the index of
x
from which m[i,1]
was
taken, and m[i,3]
is the index of y
from which m[i,1]
was taken. If the vector arguments
are ordered, the JOIN
function will proceed much faster than if they are unordered.
Example
Suppose that you have two vectors:
X = [0;1;2;3;4;5;6;7;8;9;10], Y = [1;3;5;7;9]
function | result | |||||
JOIN(X,Y) |
|