94
Dyadic (Two-Argument) Form: Generalized Transpose
A~B
The generalized
transpose
function interchanges
the
coordinates of argument B
as
specified by argument A. Argument B can be any expression. Argument A must
be a vector or a scalar, and must have an element for each coordinate
of
argument
B;
also, argument A must contain all
the
integers between 1 and
the
largest integer
specified. For example,
to
transpose
the
rows and columns of a matrix, argument A
would be 2 1:
Hf·2
~3~)
:I.
H
:I.
2
:~
I.~
I::'
••
J
6
1"\
.:.:
:I.~B
1
I.J.
11
AM
5
3 6
To
transpose
the
rows and columns
of
a 3-rank (three-coordinate) array, argument A
would be 1 3 2:
B~"2
~5
I.J.
f) \ 2
1
.J.
B
1
I")
tI..
M1.
..
)
4·
t::"
\J
6
"l
B
9
10
:I.
:I.
12
An array with
two
planes, three rows, and four columns.
13
1
1
.1.
:1.
!7;
:1.1.>
:1.7
1B
19
20
21
22
23
21.1·
1.
3
2~B
:I.
r:
..J
9
2
~)
10
3
7
1:1.
l~
B
12
The second and third coordinates have been interchanged,
13
17
2:1.
forming an array with
two
planes, four rows, and
three
columns.
:1.4·
:LB
22
15
19
23
11.>
20
~~l~