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 #45 background imageLoading...
Page #45 background image
(
(
("/
c
Indexing a matrix
or
N~rank
array requires an index number
f<;>r
each coordinate.
The index numbers for each coordinate are separated by semicolons. Suppose M
is
a 3 by 4 matrix of consecutive integers:
M~3
4p1
2 3 4 5 6 7 8 9 10 11
12
If you ask
to
see
the
values
of
M,
they
are displayed
in
the
usual matrix form:
M
1.
r)
~
~z
..
)
I.f.
~5
6
..,
8
(
9
1.0
11
1
r)
~
If
you
want
to
refer
to
the
element
in
row
2,
column 3,
you
would enter:
M[2;3J
If
you
want
to
refer
to
the third and
fourth
elements
in
that
row,
you
would enter:
..,
8
Similarly,
to
refer
to
the
elements
in
column 4, rows
1,2,
and 1,
you
would enter:
I.f.
8
L\.
You can use
the
same procedure
to
select a matrix within a matrix.
If
you
want
the
matrix
of
those
elements
in
rows 2 and.3 and columns
1,2,
and 1 of
M,
you
would
enter:
MI:2
3;1.
2
1]
~)
6
c'
oJ
9
1.0
9
If
you
do
not
specify the index number for one or more of
the
coordinates
of
the
array
that
you are indexing, APL assumes
that
you
want
the
entire coordinate(s).
For instance,
to
get all of row 2,
you
would enter:
MC2j]
5 6 7 8
41

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