Section: Mathematical Operators
/
is really a combination of three
operators, all of which have the same general syntax:
Y = A / B
where A
and B
are arrays of numerical type. The result Y
depends
on which of the following three situations applies to the arguments
A
and B
:
A
is a scalar, B
is an arbitrary n
-dimensional numerical array, in which case the output is the scalar A
divided into each element of B
.
B
is a scalar, A
is an arbitrary n
-dimensional numerical array, in which case the output is each element of A
divided by the scalar B
.
A,B
are matrices with the same number of columns, i.e., A
is of size K x M
, and B
is of size L x M
, in which case the output is of size K x L
.
A
and B
are integers, the output is an integer also, while in the third case if A
and B
are integers, the output is of type double
.
and the second form
In the third form, the output is defined as:
and is used in the equation Y B = A
.
--> B = [1,1;0,1]; --> A = [4,5] A = 4 5 --> A/B ans = 4 1