(~
('
('
Note:
The
mixed functions
reverse,
rotate,
compress,
and
expand,
and
the
operators
(see
Operators
later
in
this chapter) reduction and
scan
can be applied
to
a specific
coordinate
of
an array. This
is
done
by
using an index
entry
[I] which indicates
the
coordinate
to
which
the
mixed
function
or
operator
is
applied.
The
value
of
the
index
entry
can be
from
1
to
the
number
of
coordinates
in
the
array;
the
leftmost
coordinate
(first coordinate) has an index value
of
1,
the
next
coordinate
has an
index value
of
2, and so on. A matrix, for example, has an index value
of
.1
for
the
row
coordinate
and an index value
of
2 for
the
column
coordinate.
If an index
entry
is
not
specified,
the
last
coordinate
(columns)
is
assumed. If a - (minus) symbol
is
overstruck with
the
function
symbol
or
operator
symbol,
the
first
coordinate
is
assumed (unless an index value was also used). When a
function
or
operator
is
ap-
plied
to
a specific coordinate,
the
operation
takes
place
between
corresponding ele-
ments
in
the
specified
coordinate.
For
example; assume
you
have a 3-rank array:
• When
the
first coordinate (planes)
is
specified, the
operation
takes
place
between
corresponding elements
in
each plane.
• When
the
second
coordinate
(rows)
is
specified,
the
operation
takes place between
the
corresponding elements
in
each row per plane.
• When
the
third
coordinate
(columns)
is
specified,
the
operation
takes
place be-
tween
the
corresponding elements
in
each column
per
plane.
The p Function:
Shape,
Reshape
(Structure)
Monadic (One-Argument) Form:
Shape
p B
The
shape
function
result
is
the
shape
of
the
argument; it has
one
element
for each
coordinate
of
the
argument, which indicates
the
length
of
that
coordinate.
The
argument
can be any variable
or
constant:
(J • ABeD ·
....
1-------
A Vector with
Four
Elements
1+
(,J
:l
"'1
A-
••
2
pl.
2 3
~3
A~"2
A
1
2
3
l~
c·
\J
6
pA
2
3
The
shape
function
applied
to
a scalar yields an
empty
vector, since a scalar has no
coordinates. An
empty
vector
is
indicated
by
a blank result line:
p2
Blank Result Lines
p'T'~
75