HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 78
(3b) MAT
num_array1
= (
num_expr
)
op num_array2
(4) MAT
num_array1
=
num_array2 op num_array3
{CON}
(5) MAT
num_array1
= {ZER} [(
dims
)]
{IDN}
(6) MAT
num_array1
=
s_or_a_function
(
num_array2
)
(7) MAT
num_array1
=
array_function
(
num_array2
)
(8) MAT
num_array1
= MUL (
num_array2, num_array3
)
Parameters
op
+, -, *, /, <, <=, =,>=, <>, or #
num_array1
In equation (4),
num_array1
must have the same number
of dimensions as
num_array2
and
num_array3
. It must
have at least as many elements as each of
num_array2
and
num_array3
.
num_array3
In equation (4),
num_array3
must have the same number
of dimensions as
num_array2
. Each dimension of
num_array3
must have the same number of elements as
the corresponding dimension of
num_array2
. However,
corresponding dimensions of
num_array3
and
num_array2
can have different bounds (for example,
num_array2
can be declared "DIM A(1:2,1:4)" and
num_array3
can
be declared "DIM B(2:3,2:5)").
In equation (8),
num_array2
and
num_array3
can both
be matrices, or one can be a matrix and one can be a
vector. The dimensions of
num_array2
and
num_array3
are subject to the restrictions in Table 4-6.
CON Sets each element of
array
to one.
ZER Sets each element of
array
to zero.
IDN Makes
array
an identity matrix. If
dims
is
specified, it must specify a square matrix. If
dims
is not specified,
array
must be a square matrix.
dims
If specified, the statement redimensions
num_array1
before assigning values to its elements.
s_or_a_function
A scalar or array function; one of the following:
ABS ACS ASN ATN CEIL LGT
DECIMAL EXP FRACT INT INTEGER LOG
REAL SDECIMAL SGN SIN SINTEGER SQR
SREAL TAN TRUNC COS
See chapter 5 for more information about these
functions.
array_function
See chapter 5 and Table 4-6 for more information
about these functions.
CSUM Stores column sums of matrix in
vector.
RSUM Stores row sums of matrix in
vector.
TRN Transposes rows and columns of