46
Dyadic (Two-Argument) Form: Minus
A-B
The
minus function subtracts argument B from argument
A.
The arguments can be
numeric scalars, vectors,
or
other
arrays.
The
arguments must be
the
same shape un-
less
one
of
the
arguments
is
a scalar
or
any single-element array. If
the
arguments
are
the
same shape, the result has
the
same shape as
the
arguments:
~:~""2
:I.
1+····~5
'+'-
'''~:5
9
2 0
-1+
If
one
argument
is
a scalar
or
a single-element array,
the
shape
of
the
result
is
the
same as
that
of
the
other
input argument.
The
single element
is
applied
to
every
element
of
the multielement array:
:l
2
~5
1+
5 l)
B~2
3p1
2 3
~
5 6
B
:~"MB
2
:I.
0
"'1 '-2 "'3
B-'3
'-2
-':1.
0
1.
:?
:3
The x Function: Signum, Times (IJ
Monadic (One-Argument) Form: Signum
xB
The
signum function indicates
the
sign
of
the
argument:
if
the
argument
is
negative,
- 1
is
the
result;
if
the
argument
is
zero,
then
0
is
the
result; if
the
argument
is
posi-
tive, 1
is
the
result. The argument can be a numeric scalar, vector,
or
other
array.
The
shape of
the
result
is
the
same
as
that
of
the
argument:
"':l 0 1
/ "
I~.
)1