Division: /

If both A and B are scalars, then A / B is the quotient of A and B. No matter they are doubles or integers, the quotient is always a floating point number of double precision. If A is not equal to zero, but B is, then A / B is inf. If both A and B are zero, then A / B is nan (meaning not a number).

If one of A and B is a scalar, while the other is a matrix, then A / B is a matrix of the same size, with each element being A divided by the each entry of B, or each entry of A divided by B, depending which one is a scalar.

If both A and B are matrices, then A / B is the (numerical) solution of matrix equation X B = A. The matrix B must be an non-singular square matrix and A must have n columns. Note that X B = A is solved numerically, so the solution can only satisfy the equation approximately.

>>  A = [3, 2, -5];
>>  B = [1, 2, -3; 2, 1, 5; 0, -1, 3];
>>  X = A / B
      11  -4  16
>>  X * B
      3    2  -5



oz 2009-12-22