next up previous

4.1 Array Operations     continued...

Conformability Requirement
The principal requirement in forming an array expression is conformability of the operands. This means that each operand of an array operation must have the same rank and the same number of elements along each dimension-that is, conformable arrays have exactly the same shape. The result of such an operation is, of course, conformable with the operands, and the value of each element of the array result is the scalar computation involving the corresponding elements of the array operands.

Thus if A and B are the following 2x3 arrays:

the result of is

and the result of is

If there is more than one operation in an expression, the (array-valued) result of the first subexpression is an operand for the second operation, and so on. For example, for and as given above, in the expression the result of is added to ; thus the result of is