EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Apl Reference Manual

IBM 5100
228 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #85 background imageLoading...
Page #85 background image
(
(
(".
e
C~'
The I Function: Compress
CD
Monadic (One-Argument)
Forra
See Reduction later
in
this
chapter
under
APL
Operators
..
Dyadic (Two-Argument) Form: Compress
A/Ul
B
or
AlB
or
AfB
The
compress function selects
elements
from
argument B corresponding in sequence
to
1 's in
argument
A.
Argument
A
must
be a logical scalar
or
vector
having
the
values 0
or
1.
Argument
B can be any scalar, vector,
or
other
array. Both arguments
must have
the
same
number
of
elements unless:
One
of
the
arguments
is
a scalar
or
single-element array.
Argument
B
is
a multidimensional array;
then
the
number
of
elements
in
argument
A
must
be
the
same as
the
length
of
the
argument B
coordinate
being
acted
on.
When
argument
B
is
a multidimensional array,
the
[I] index
entry
is
used
to
specify
the
coordinate
that
is
acted on. If
the
index
entry
is
omitted,
the
last
coordinate
(columns)
is
assumed. If
the
AJ.B
form
is
used,
the
first
coordinate
is
assumed. The
rank
of
the
result
is
the
same as
the
rank of argument
B:
0
()
2
I.J.
:I.
:1.
:l./l
2
~:~
1
")
3
.....
/Blank
Display Line (empty array)
()
(}
OIl
")
:3
..:..
[H<5
I.J.
f>:I.
2
:3
I.J.
,::-
,.J
I.>
"7
B 9
10
II
:I.
::.~
B
1
")
.:-
:3
I.J.
c'
·_1
(~)
"7
B
9
j.O
11
:1.
:~
:I.
0
:l./[:I.::tB
The
first
coordinate
(rows)
is
specified;
1.
...
)
:5
I.J.
\
..:..
the
first
and
third
rows, as specified by
<"i
10
j.l
j
':>
.....
argument
A, are selected .
0 1
:1.
O/r:2::tB
2 3
\
The
second
coordinate
(columns)
is
specified;
6
"7
the
second
and
third
columns, as specified
by
:1.
0
11.
1
0
liB
argument
A, are selected.
:l
t·)
.:-
3
9 10
11
j
')
......
0 1 1
O/S
2
:5
6
"7
10
11
liB
:I.
2 3
!5
I.)
'7
8
9
10
:I.
:1.
1
':>
....
OIB
Blank Display Line
(empty
array)
81

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals